首页 > 技术文章 > TP5自定义路由,为了安全性

yunhubuxi 2020-06-14 23:54 原文

1,入口文件index.php,不要指定任意模块,不然,自定义路由,就不会有任何效果哦

2,在配置文件 route.php  中引进   use think\Router  自带路由文件

3,将路由进行定义,Route::post('/web/v1/test','/index.php/dome/test');

4,在浏览器用 域名/web/v1/test  进行访问,以上就是自定义路由

5,亲测过

推荐阅读