使用wamp访问localhost时查看项目地址不对

使用wamp访问localhost时查看项目地址不对_html

直接点击访问不到,http://路径少了一个localhost。

怎么办呢?

使用wamp访问localhost时查看项目地址不对_php_02

找到wamp 的www 目录下的index.php 文件打开后 找到399行这里

$handle=opendir(".");

$projectContents = '';

while (($file = readdir($handle))!==false)

{

if (is_dir($file) && !in_array($file,$projectsListIgnore))

{

$projectContents .= '<li><a href="';

if($suppress_localhost)

$projectContents .= 'http://'.$file.$UrlPort.'/"';

else

$projectContents .= 'http://localhost'.$UrlPort.'/'.$file.'/"';

$projectContents .= '>'.$file.'</a></li>';

}

}

修改一行:

使用wamp访问localhost时查看项目地址不对_html_03


你要保守你心,胜过保守一切。

作者:刘俊涛的博客​​