在thinkphp6中,可以這樣訪問某個文件夾的控制器。例如:/admin/area.province.html 這樣寫代表admin模塊下面,area文件夾下,province控制器。
但是這樣寫的話,在加載模板的時候,會出現錯誤。The "G:\gaowangbei\app\admin\view\area.province\" directory does not exist ("G:\gaowangbei\app\admin\view\area.province\").
如何解決?
找到\vendor\twig\twig\src\Loader\FilesystemLoader.php,這個文件, 把throw new LoaderError(sprintf('The "%s" directory does not exist ("%s").', $path, $checkPath)); 這行註釋掉。立馬解決。