this is index.php
<?php
require 'core/bootstrap.php';
require Router::load('routes.php')->direct(Request::uri());
this is Router.php
<?php
class Router
{
protected $routes = [];
public static function load($file)
{
$router = new static;
require $file;
return $router;
}
public function define($routes)
{
$this->routes = $routes;
}
public function direct($uri)
{
if (array_key_exists($uri, $this->routes)) {
return $this->routes[$uri];
}
}
}
Warning: require(): Filename cannot be empty in C:\xampp\htdocs\PhpProject1\index.php on line 6
Fatal error: require(): Failed opening required '' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\PhpProject1\index.php on line 6
I'm getting this error.