我使用这个路由器 - https://github.com/dannyvankooten/PHP-Router,如下所示:
$collection->attachRoute(new PHPRouter\Route('/install.php', [
'_controller' => 'App\Controllers\Install::Install',
'methods' => ['GET','POST'],
'parameters'=> ['template_file'=>'../../install/install'],
]));
Run Code Online (Sandbox Code Playgroud)
我收到此错误:
$collection->attachRoute(new PHPRouter\Route('/install.php', [
'_controller' => 'App\Controllers\Install::Install',
'methods' => ['GET','POST'],
'parameters'=> ['template_file'=>'../../install/install'],
]));
Run Code Online (Sandbox Code Playgroud)
参数是我添加的,也许有问题...你能帮我吗?
在 core.php 的第 389 行我有这个:
$route = $router->matchCurrentRequest();
Run Code Online (Sandbox Code Playgroud)
在路线php上: https: //github.com/dannyvankooten/PHP-Router/blob/master/src/Route.php router.php: https: //github.com/dannyvankooten/PHP-Router/blob/master/src /路由器.php
请给我建议如何解决这个问题:)