docs: update example links

This commit is contained in:
tlanyan
2021-01-08 18:05:32 +08:00
parent 32317a419b
commit 5959e80efb
5 changed files with 32 additions and 11 deletions
+2
View File
@@ -87,6 +87,8 @@ function handler(Psr\Http\Message\ServerRequestInterface $req) {
}
function serveStaticFiles(string $url) {
if ($url == "") $url = "index.html";
$path = ROOT . "/$url";
$path = realpath($path);
if (strpos(ROOT, $path) === 0 && is_file($path)) {