核心提示:www目录下找到index.php,修改如下代码:修改前:while (($file = readdir($handle))!==false){if (is_dir($file)!in_array($...
www目录下找到index.php,修改如下代码:
修改前:
while (($file = readdir($handle))!==false) { if (is_dir($file) && !in_array($file,$projectsListIgnore)) { $projectContents .= '<li><a href="'; if($suppress_localhost) $projectContents .= 'https://'.$file.$UrlPort.'/"'; //需要改动的地方 else $projectContents .= 'https://localhost'.$UrlPort.'/'.$file.'/"'; $projectContents .= '>'.$file.'</a></li>'; } }
修改后:
while (($file = readdir($handle))!==false) { if (is_dir($file) && !in_array($file,$projectsListIgnore)) { $projectContents .= '<li><a href="'; if($suppress_localhost) $projectContents .= 'https://localhost/'.$file.$UrlPort.'/"'; //改动后的 else $projectContents .= 'https://localhost/'.$UrlPort.'/'.$file.'/"'; $projectContents .= '>'.$file.'</a></li>'; } }
重新启动wampserver即可打开。