mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
add code for testing wildcard routes
This commit is contained in:
parent
b07b94b59a
commit
2e2ca3cc6a
15
index.php
15
index.php
|
@ -60,6 +60,21 @@ if(true) {
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
$app->get('/out/[{path:.*}]', function($request, $response, $path = null) use ($app) {
|
||||
$uri = $request->getUri();
|
||||
if($uri->getBasePath())
|
||||
$file = $uri->getPath();
|
||||
else
|
||||
$file = substr($uri->getPath(), 1);
|
||||
if(file_exists($file) && is_file($file)) {
|
||||
$_SERVER['SCRIPT_FILENAME'] = basename($file);
|
||||
include($file);
|
||||
exit;
|
||||
}
|
||||
});
|
||||
*/
|
||||
|
||||
$app->run();
|
||||
} else {
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user