4) { if (strcasecmp(substr($uri, $len - 4), ".php") == 0) { return true; } } return false; } function dots_not_found($uri) { echo "File not found: $uri \n"; return; } $script_root = $_SERVER['SCRIPT_ROOT']; $uri = $_SERVER['REQUEST_URI']; $uri_path = strtok($uri, "?"); $uri_query = strtok("?"); // error_log("log: uri=$uri, uri_path=$uri_path, uri_query=$uri_query :end", 0); // not triggered by DotSlash if ($script_root == "" || !dots_php_script($uri_path)) { dots_not_found($uri); return; } header("HTTP/1.1 200 OK"); set_error_handler("dots_err_handler"); if (!function_exists("dots_call_back")) { function dots_call_back($file) { include($file); } } $file = $script_root . "/" . $_SERVER['ORIG_SERV'] . $uri_path; dots_include($file, $uri_path, $uri_query); ?>