小编pok*_*ok4的帖子

PHP 8 未知命名参数 - Dannyvankooten 路由器

我使用这个路由器 - 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

请给我建议如何解决这个问题:)

php router

1
推荐指数
1
解决办法
7053
查看次数

标签 统计

php ×1

router ×1