pathinfo_depr 设置为'-'非'/' 后BUG
URL正常生成地址为:/index.php/cms-article-read-id-18.html
访问后出现无法找到控制器错误
控制器不存在:app\controller\Cms
经过排查发现 多应用中存在BUG
MultiApp.php
第126行
$name = current(explode('/', $path));未将$path获取到的路径统一分割符 ,导致修改设置路由pathinfo_depr为其他后符号后,以上代码是按照'/'符号转为数组导致出现BUG自己按照 5.0 的思路在126行上方增加了
$path=trim(str_replace($this->app->config->get('route.pathinfo_depr'),'/',$path),'/');代码就可以通过
/index.php/cms-article-read-id-18.html
/index.php/cms/article/read/id/18.html
两种方式同时访问
如果按照pathinfo_depr设置的符号唯一访问
比如 设置为'-'
那么只能/index.php/cms-article-read-id-18.html 这样正常访问
需要将126行
$name = current(explode('/', $path));修改为$name = current(explode($this->app->config->get('route.pathinfo_depr'), $path));希望官方能修复这个BUG 最佳答案