In there
exist a simple example of MVC in PHP. the problem is, this example just work when this
$action = $_GET['action'];
if(function_exists($action) && !substr($action,0,1)=="_"){
$action();
}else{
echo "<h1>404 Page Not Found</h1><p>The page you requested could not be found</p>";
}
changed to:
$action = $_GET['action'];
if(function_exists($action) || !substr($action,0,1)=="_"){
$action();
}else{
echo "<h1>404 Page Not Found</h1><p>The page you requested could not be found</p>";
}
&& changed to ||. or completely !substr($action,0,1)==”_” removed. What does this line is not allowed to run $action?
=======================
Edit: Problem is that router don’t work with &&!
Solved with change
From:
To: