This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
|
<?php
|
|
function dispatch ($urls) {
|
|
$path_info = $_SERVER['PATH_INFO'];
|
|
$fname = $urls[$path_info];
|
|
if ($fname) {
|
|
$fname();
|
|
exit(0);
|
|
} else {
|
|
header("HTTP/1.0 404 Not Found");
|
|
exit(0);
|
|
}
|
|
}
|