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

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

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

怎么办呢?

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

找到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时查看项目地址不对

相关文章:

  • 2021-09-13
  • 2021-12-03
  • 2021-07-26
  • 2021-07-28
  • 2021-05-18
  • 2022-12-23
  • 2022-12-23
  • 2021-06-29
猜你喜欢
  • 2021-07-04
  • 2022-12-23
  • 2021-08-19
  • 2021-09-20
  • 2021-12-12
  • 2021-07-22
  • 2021-07-23
相关资源
相似解决方案