最新多应用http://a.io/test访问会把test作为应用

浏览:1873 发布日期:2019/10/08 分类:ThinkPHP6专区 关键字: think-multi-app 多应用
我在index应用下面有route有设置路由
在根目录的route也有设置,不会加载,源码我看过了app目录已经被指向/app/test/了Route::get('test', 'index/test');下面是这部分的代码,搞不清是我用法问题还是这里有问题...                } else {
                    /*if (!is_dir($this->app->getAppPath() . $name)) {
                        $name = null;
                    }*/
                    $appName = $name;
                }

                if ($name) {
                    $this->app->request->setRoot('/' . $name);
                    $this->app->request->setPathinfo(strpos($path, '/') ? ltrim(strstr($path, '/'), '/') : '');
                }
最佳答案
评论( 相关
后面还有条评论,点击查看>>