(.*)<\/title>/', $file, $matches); $file = preg_replace('/(.*?)<\/title>/', '', $file); $title = $matches[1]; $manifest = ''; if ($request == 'offlineapp') { // specific change to support <html manifest=xyz> $manifest = ' manifest="html5demo.appcache"'; } include('includes/header.php'); echo $file; include('includes/footer.php'); } else { header("HTTP/1.0 404 Not Found"); echo 'File not found'; } ?>