Error After Installing Magento 2
Go to – “D:\xampp\htdocs\mage2\vendor\magento\framework\View\Element\Template\File\”. Open The file name Validator.php
Search for “$this->fileDriver->getRealPath“, you will find the similar code. Replace them with it accordingly. Basically add a php function to replace ‘\\’ with ‘\’.
strpos( str_replace( ‘\\’,’/’,$this->fileDriver->getRealPath($path) ), $directory )
Clear caches of Magento 2. Go to following paths and delete everything:
Installation root folder / var /cache/, and delete all files.
Installation root folder / page_cache/, and delete all files.
Installation root folder / var / session/, and delete all files.