📌  相关文章
📜  异常 #0 (Magento\Framework\Exception\ValidatorException):无效的模板文件:- PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:38.444000             🧑  作者: Mango

代码示例1
> protected function isPathInDirectories($path, $directories) {
>     if (!is_array($directories)) {
>         $directories = (array)$directories;
>     }
>     $realPath = $this->fileDriver->getRealPath($path);
>     $realPath = str_replace('\\', '/', $realPath); // extra code added
>     foreach ($directories as $directory) {
>         if (0 === strpos($realPath, $directory)) {
>             return true;
>         }
>     }
>     return false; }