return [// '__pattern__' => [// 'name' => '\w+',// ],// '[hello]' => [// ':id' => ['index/hello', ['method' => 'get'], ['id' => '\d+']],// ':name' => ['index/hello', ['method' => 'post']],// ], 'news/:id' => ['admin/index/info'], 'hello/:name' => ['index/index/hello'],];在app应用目录下有个route.php 路由这样配置的 但是访问提示页面错误 请问是哪里的问题tp5是项目目录http://localhost/tp5/public/hello/name/thinkphphttp://localhost/tp5/public/news/6001
1 回答

蛋肠加辣不要葱
TA贡献43条经验 获得超9个赞
use think\Route; Route::get('路由规则', '模块名/方法名'); Route::post('路由规则', '模块名/方法名'); //eg: Route::post('user/add', 'api/user/adduser');
- 1 回答
- 0 关注
- 1694 浏览
添加回答
举报
0/150
提交
取消