码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2017-05-08 14:19:46      阅读:515      评论:0      收藏:0      [点我收藏+]

标签:strong   host   nts   dir   cts   file   修改   res   add   

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

技术分享

直接点击访问不到,http://路径少了一个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时查看项目地址不对

标签:strong   host   nts   dir   cts   file   修改   res   add   

原文地址:http://www.cnblogs.com/lovebing/p/6824407.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!