按照來自here的說明,我創建了2個別名目錄。XAMPP - 別名 - 未知:無法打開流
<Directory "C:\Users\user\Documents\sites">
Allow from all
Require all granted
</Directory>
Alias /site "C:\Users\user\Documents\sites"
<Directory "S:\directory (servername)\site">
Allow from all
Require all granted
</Directory>
Alias /lab "S:\directory"
當我訪問localhost/site
它工作正常,並加載在那裏的網頁。
當我訪問localhost/lab
時,它返回一個錯誤。
Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0
Fatal error: Unknown: Failed opening required 'S:/directory (servername)/site/index.php' (include_path='.;C:\ProgramData\xampp\php\PEAR') in Unknown on line 0
當我在S:\directory (servername)
屬性沒有注意到的是,S:\directory (servername)
PATH實際上是\\servername\directory (servername)
所以它被映射。
我該如何去取得我的別名工作,以便我可以成功訪問localhost/lab
。
感謝