此問題來自薇曉朵技術論壇使用者提問,原貼地址:https://bbs.weixiaoduo.com/topic/18000

WampServer 正常安裝進入 localhost 後 Your Projects 點選連結不正確的解決方法

問題描述:

 

解決方法一:

1 、這個問題是因為你在安裝 wamp 的時候最後一步,沒有選擇重啟資源管理器,

2 、重新安裝下 wamp ,然後記得最後一步,選擇重啟資源管理器的時候點 是 。

 

解決方法二:

補充一個解決方案:

找到 D:\wamp\www\index.php 檔案開啟,最好是用 notepad++ 等專業修改程式碼的工具

2016-3-14-03-21-56


$projectContents .= '<li><a href="'.($suppress_localhost%20?%20'http://'%20:%20'').$file.'">'.$file.'</a></li>';

大致在 338 行改為:
$projectContents .= '<li><a href="'.($suppress_localhost%20?%20'http://localhost/'%20:%20'').$file.'">'.$file.'</a></li>';

然後儲存即可。

方法二最為徹底,其實就是在根目錄的 index.php 裡面加上手動加上 localhost 域名字首,這樣也就完事了。