📅  最后修改于: 2022-03-11 14:53:38.444000             🧑  作者: Mango
> 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; }