后台入口文件有问题

浏览:595 发布日期:2019/04/28 分类:ThinkPHP5专区 关键字: 资源路由
<?php

define('APP_PATH', __DIR__ . '/../application/');
define('APP_NOW',date("Y-m-d H:i:s"));

require __DIR__ . '/../thinkphp/base.php';

\think\Route::bind('admin');//绑定入口

\think\App::route(false); //关闭admin模块的路由

\think\Route::resource('api','admin/api');//新建路由规则

\think\App::run()->send();// 执行应用


但是发现一个严重问题,route.php是针对应用的,所以需要admin.php需要关闭。但是关闭后,想用资源路由却用不了!会提示非法访问,
最佳答案
评论( 相关
后面还有条评论,点击查看>>