function _outputFile($_file) { Kurogo::log(LOG_DEBUG, "Output file {$_file}", 'kurogo'); if ($file = Watchdog::safePath($_file)) { CacheHeaders($file); header('Content-type: ' . mime_type($file)); readfile($file); exit; } _404(); }
function _outputFileLoaderFile($matches) { $fullPath = FileLoader::load($matches[1]); if ($fullPath) { CacheHeaders($fullPath); header('Content-type: '.mime_type($fullPath)); echo file_get_contents($fullPath); exit; } _404(); }