tinyfilemanager
tinyfilemanager copied to clipboard
Unable to preview, edit a php file that returns a 404 header
A php file contains this code:
if(array_key_exists('REQUEST_URI', $_SERVER)){
if(strpos($_SERVER['REQUEST_URI'], basename(__FILE__)) !== false){
header('HTTP/1.0 404 Not Found', true, 404);
die();
}
}
Now if you preview or edit that file in tinyfilemanager, you will see a 404 error in the browser instead of the actual php code.
Shouldn't the viewer/editor etc. work regardless of the content of a .php file?
BTW, this happens just in the embedded mode:
define('FM_EMBED', true);