'image/x-icon', 'png' => 'image/png', 'jpg' => 'image/jpg', 'jpeg' => 'image/jpeg', 'gif' => 'image/gif', 'css' => 'text/css', 'js' => 'application/javascript', 'woff2' => 'font/woff2', 'woff' => 'font/woff', 'ttf' => 'font/ttf', 'xls' => 'application/vnd.ms-excel', 'zip' => 'application/octet-stream', 'mp4' => 'video/mp4',]; if (isset($path['extension']) && in_array($path['extension'], $extensions)) { header("Content-type: {$headers[@$path['extension']]};charset=UTF-8"); $cache_time = 600; header ("Last-Modified: " .gmdate("D, d M Y H:i:s", time() )." GMT"); header ("Expires: " .gmdate("D, d M Y H:i:s", time()+$cache_time )." GMT"); header ("Cache-Control: max-age=$cache_time"); if(file_exists(__DIR__ . $path['dirname'] . '/' . $path['basename'])) { echo file_get_contents(__DIR__ . $path['dirname'] . '/' . $path['basename']); exit; }else { $website = require_once __DIR__ . '/../data/' . $host . '/website.php'; $file = __DIR__ . '/' . $website['template'] . $path['dirname'] . '/' . $path['basename']; if(file_exists($file)) { echo file_get_contents($file); exit; }else { header("Content-type: text/html;charset=UTF-8"); header('HTTP/1.1 404 Not Found'); echo '