tp6多应用,多入口,生成的url是不是有误?

浏览:7617 发布日期:2019/11/28 分类:ThinkPHP6专区 关键字: tp6
比如,admin.php的入口代码:namespace think;
require __DIR__ . '/../vendor/autoload.php';
// 执行HTTP应用并响应
$http = (new App())->http;
$response = $http->name('admin')->run();
$response->send();
$http->end($response);
url('index/index')生成的url是:http://127.0.0.1/admin.php/admin/index/index.html
这样就报错了,

正确的url是不带应用名的,如:http://127.0.0.1/admin.php/index/index.html

但url('index/index')却生成了错误的url地址,有知道怎么解决的吗?付费
最佳答案
评论( 相关
后面还有条评论,点击查看>>