문제

After successful installation when i run the admin url it's giving me this. I'm not sure what's happening. So if anyone have any solution for this it will be great help.

Image

도움이 되었습니까?

해결책

Update

This is Magento bug. Wrong paths to Windows are generated. The fixed fix is

Magento 2.3.0 - 2.3.3

#/vendor/magento/framework/View/Element/Template/File/Validator.php:140

the string

if (0 === strpos($realPath, $directory)) {
    return true;
}

to replace

$realDirectory = $this->fileDriver->getRealPath($directory);
if ($realDirectory && 0 === strpos($realPath, $realDirectory)) {
   return true;
}

Magento 2.2.7

/vendor/magento/framework/View/Element/Template/File/Validator.php:113

code

protected function isPathInDirectories($path, $directories)
{
    if (!is_array($directories)) {
        $directories = (array)$directories;
    }
    foreach ($directories as $directory) {
        if (0 === strpos($this->fileDriver->getRealPath($path), $directory)) {
            return true;
        }
    }
    return false;
}

to replace

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

If You can't find out the (/vendor/magento/framework/) folder in magento 2.2.7 - 2.3.3 . Then You can check it here:

#lib\internal\Magento\Framework\View\Element\Template\File\Validator.php

다른 팁

If You can't find out the (/vendor/magento/framework/) folder in magento 2. Then You can check it here:

C:\xampp\htdocs\magento\lib\internal\Magento\Framework\View\Element\Template\File\Validator.php
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top