define('APP_PATH', __DIR__ . '/../application/');
define('APP_NOW',date("Y-m-d H:i:s"));
require __DIR__ . '/../thinkphp/ba
\think\Route::bind('admin');//绑定入口
\think\App::route(false); //关闭admin模块的路由
\think\Route::resource('api','admin/api');//新建路由规则
\think\App::run()->send();// 执行应用
但是发现一个严重问题,route.php是针对应用的,所以需要admin.php需要关闭。但是关闭后,想用资源路由却用不了!会提示非法访问,
最佳答案