Closed ken678 closed 2 weeks ago
所属功能组件
路由(Route)
8.0.3
windows
Route::buildUrl('index/user/index')->root('/index.php'); www.xxx.com/index.php下生成的url如下
tp8.0 url生成文档说明如下
thinkphp5.1无此问题,因为没有红框那段代码,他的index.php是在root里面获取到的,所以可以用root控制index.php隐藏
如果你本来的访问就是带 index.php 的话 是不需要额外设置的 只有在不带index.php的访问下 需要生成其它入口文件的地址才需要设置
所属功能组件
路由(Route)
ThinkPHP 版本
8.0.3
操作系统
windows
错误信息
Route::buildUrl('index/user/index')->root('/index.php'); www.xxx.com/index.php下生成的url如下![image](https://github.com/top-think/framework/assets/15792472/a5adf461-f547-4e23-a602-57ab81a6a0a0)
其它说明
tp8.0 url生成文档说明如下![image](https://github.com/top-think/framework/assets/15792472/b238d8ee-f864-4771-9431-83bec18cc9ca)
thinkphp5.1无此问题,因为没有红框那段代码,他的index.php是在root里面获取到的,所以可以用root控制index.php隐藏![image](https://github.com/top-think/framework/assets/15792472/1c78498f-ff39-48c3-8d3a-0f44daf6b2ff)