Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map function does not work on Xampp #250

Open
ejamshidiasl opened this issue Apr 2, 2020 · 1 comment
Open

Map function does not work on Xampp #250

ejamshidiasl opened this issue Apr 2, 2020 · 1 comment

Comments

@ejamshidiasl
Copy link

ejamshidiasl commented Apr 2, 2020

Hello
OS: windows

i put my website in htdocs root directory. when i do this code it cannot load index.php from views directory without any error.

include ('router/AltoRouter.php');
$router = new AltoRouter();
$router->map( 'GET', '/', function() {
   require (__DIR__ . '/views/index.php');
},"home");

project structure:

  • router : alto files
  • views
    • index.php
  • .htaccess => rewite works (i checked)
  • index.php => rewite works (i checked)

urls i checked:

also

  • i added echo 'done' to $router->map but nothing happened
  • i followed getting started articles.
@dinhunzvi
Copy link

try setting the base path

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants