TP6 多级控制器失效

浏览:492 发布日期:2021/01/31 分类:ThinkPHP6专区
<?php
namespace app\Controller\index;
use app\BaseController;
use think\facade\View;
class Index extends BaseController{
    public function Index(){
        return View::fetch('index');
    }
}
    // 是否启用路由
    'with_route'       => false,
 protected function parseUrl(string $url):array
    {
        $depr = $this->rule->config('pathinfo_depr');
        $bind = $this->rule->getRouter()->getDomainBind();
        $item = explode('|',$url);
        if(count($item)==3){
            $url = $item[0].'.'.$item[1].'|'.$item[2];
        }else{
            $item = explode('|',$url);
            $url = $item[0].'.'.$item[1].'|'.$item[2];
        } 
最佳答案
评论( 相关
后面还有条评论,点击查看>>