Beispiel #1
0
 private function notFound($route, $params = '')
 {
     echo "<h1> Page: " . $_SERVER['HTTP_HOST'] . $this->url . " not found</h1>";
     if (AppConfig::getDebugFlag()) {
         echo "<h2> Your route: " . $route . " in routes.php </h2>";
         if ($params != '') {
             echo "<h3> Params: " . implode('/', $params) . "</h3>";
         }
         debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
     }
     if (AppConfig::getLogFlag()) {
         error_log("Page: " . $_SERVER['HTTP_HOST'] . $this->url . "\n", 3, '../logs/log.log');
         error_log("Your route: " . $route . " in routes.php", 3, '../logs/log.log');
         //error_log(implode(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS), '/'), 3, '../logs/log.log');
     }
 }
Beispiel #2
0
<?php

require_once '../core/autoload.php';
require_once '../core/routes.php';
use Core\Config\AppConfig;
use Core\Routing\Route;
use App\Models\Users;
AppConfig::setDebugFlag(true);
AppConfig::setLogFlag(true);
$route = new Route();
$route->run();