-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
所属功能组件
路由(Route)
ThinkPHP 版本
8.1.3
操作系统
Windows
错误信息
当前访问路由未定义或不匹配
开启强制路由
'url_route_must' => false,
{"code":0,"message":"当前访问路由未定义或不匹配","traces":[{"name":"think\exception\RouteNotFoundException","file":"F:\Project\WWW\xxx\vendor\topthink\framework\src\think\Route.php","line":740,"code":0,"message":"当前访问路由未定义或不匹配","trace":[{"file":"F:\Project\WWW\xxx\vendor\topthink\framework\src\think\Route.php","line":704,"function":"check","class":"think\Route","type":"->","args":["error|500",true]},{"file":"F:\Project\WWW\xxx\vendor\topthink\framework\src\think\Http.php","line":208,"function":"dispatch","class":"think\Route","type":"->","args":[{},{}]},{"file":"F:\Project\WWW\xxx\vendor\topthink\framework\src\think\Http.php","line":198,"function":"dispatchToRoute","class":"think\Http","type":"->","args":[{}]},{"file":"F:\Project\WWW\xxx\vendor\topthink\framework\src\think\Pipeline.php","line":59,"function":"think\{closure}","class":"think\Http","type":"->","args":[{}]},{"file":"F:\Project\WWW\xxx\app\middleware\AllowCorsPreflight.php","line":59,"function":"think\{closure}","class":"think\Pipeline","type":"->","args":[{}]},{"function":"handle",
关闭强制路由
'url_route_must' => false,
{"code":0,"message":"控制器不存在:app\controller\Error","traces":[{"name":"think\exception\HttpException","file":"F:\Project\WWW\xxx\vendor\topthink\framework\src\think\route\dispatch\Controller.php","line":108,"code":0,"message":"控制器不存在:app\controller\Error","trace":[{"file":"F:\Project\WWW\xxx\vendor\topthink\framework\src\think\route\Dispatch.php","line":48,"function":"exec","class":"think\route\dispatch\Controller","type":"->","args":[]},{"file":"F:\Project\WWW\xxx\vendor\topthink\framework\src\think\Route.php","line":717,"function":"run","class":"think\route\Dispatch","type":"->","args":[]},{"file":"F:\Project\WWW\xxx\vendor\topthink\framework\src\think\Pipeline.php","line":59,"function":"think\{closure}","class":"think\Route","type":"->","args":[{}]},{"file":"F:\Project\WWW\xxx\vendor\topthink\framework\src\think\Pipeline.php","line":66,"function":"think\{closure}","class":"think\Pipeline","type":"->","args":[{}]},
其它说明
路由确实已经定义了,并且在执行时间短不超时的情况下可以正常访问,执行时间长超时的情况下报路由问题,而不是报超时相关问题,误导开发者。