From 41e85d350066854f95f1fd2680af6cff0a972042 Mon Sep 17 00:00:00 2001 From: SteamPixel Date: Fri, 15 May 2020 12:08:23 +0200 Subject: [PATCH] Added a basepath variable to the demo file --- index.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/index.php b/index.php index abd1525..c42d949 100644 --- a/index.php +++ b/index.php @@ -9,6 +9,10 @@ include 'src/Steampixel/Route.php'; // Define a global basepath define('BASEPATH','/'); +// If your script lives in a subfolder you can use the following example +// Do not forget to edit the basepath in .htaccess if you are on apache +// define('BASEPATH','/api/v1'); + function navi() { echo ' Navigation: @@ -151,12 +155,7 @@ Route::methodNotAllowed(function($path, $method) { }); // Run the Router with the given Basepath -// If your script lives in the web root folder use a / or leave it empty Route::run(BASEPATH); -// If your script lives in a subfolder you can use the following example -// Do not forget to edit the basepath in .htaccess if you are on apache -// Route::run('/api/v1'); - // Enable case sensitive mode, trailing slashes and multi match mode by setting the params to true -// Route::run('/', true, true, true); +// Route::run(BASEPATH, true, true, true);