I cannot seem to figure out why I keep getting this error on line 17. The call stack says Location : 27
, that is route function and Location : 0
and that is {main}( )
.
<?php
define("true-access", true);
session_start();
ob_start();
function get_option_enabled($option) {
if ($option == "store") {
return "store/controller.php";
} else {
return false;
}
}
function route() {
$option = empty($_GET["option"]) ? "store" : $_GET["option"];
$view = empty($_GET["view"]) ? "list" : $_GET["view"];
//get files to include from database
if ($controller = get_option_enabled($option)) {
include_once('components/' . $controller);
controller_route($view);
} else {
echo "404";
}
}
route();
ob_end_flush();
?>