- preg_replace: documentation ( source)
<?php
$var = '##_autoconfig_start. Config below is generated automaticly by control panel. Direct file chenges will be owrerriden. Do not remove or modify this line
location / {
proxy_pass http://88.208.0.36:80;
proxy_redirect off;
proxy_intercept_errors on;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
location @fallback {
proxy_pass http://88.208.0.36:80;
proxy_redirect off;
proxy_intercept_errors on;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
location ~ ^.+\\.(png|PNG|jpg|JPG|jpeg|JPEG|gif|GIF|ico|wmv|avi|flv|mpg|mpeg|mp4|zip|rar|gz|html|css|js|txt)$ {
expires 3d;
error_page 404 = @fallback;
}
##_autoconfig_end. Do not remove or modify this line.
##ngtest';
print preg_replace('/(^##_autoconfig_start(.*[\n\r]?)+?##_autoconfig_end.*$)/m', "", $var);