mirror of
https://github.com/dannyvankooten/AltoRouter.git
synced 2025-01-17 20:28:26 +01:00
add support for php's built-in web server to example. #226
This commit is contained in:
parent
87d93b6840
commit
9e9767e8fa
@ -1,6 +1,14 @@
|
||||
<?php
|
||||
|
||||
require '../../AltoRouter.php';
|
||||
require __DIR__ . '/../../AltoRouter.php';
|
||||
|
||||
/**
|
||||
* This can be useful if you're using PHP's built-in web server, to serve files like images or css
|
||||
* @link https://secure.php.net/manual/en/features.commandline.webserver.php
|
||||
*/
|
||||
if (file_exists($_SERVER['SCRIPT_FILENAME']) && pathinfo($_SERVER['SCRIPT_FILENAME'], PATHINFO_EXTENSION) !== 'php') {
|
||||
return;
|
||||
}
|
||||
|
||||
$router = new AltoRouter();
|
||||
$router->setBasePath('/AltoRouter/examples/basic');
|
||||
|
Loading…
x
Reference in New Issue
Block a user