wampserver 重装中遇到的两个问题

问题1

  安装后可以访问localhost,但是不能访问wamp下面创建的文件夹。如www

  解决方案 index.php 文件编辑器打开

  找到 

    

  while (($file = readdir($handle))!==false)
  {
  if (is_dir($file) && !in_array($file,$projectsListIgnore))
  {
  //[modif oto] Ajout éventuel de http:// pour éviter le niveau localhost dans les url
  $projectContents .= '<li><a href="'.($suppress_localhost ? 'http://' : '').$file.'">'.$file.'</a></li>';
  }
  }

  其中 $suppress_localhost ? 'http://' : '' 修改为$suppress_localhost ? 'http://localhost/' : ''      注意:localhost后面有个/

 

问题2

  能够访问文件夹了,但是图标没有。对于有强迫症的我很不舒服!

 

  解决方案。 编辑器打开  C:\wamp\bin\apache\apache2.4.9\conf\extra\httpd-autoindex.conf

  修改

Alias /icons/ "c:/Apache24/icons/"

<Directory "c:/Apache24/icons">

Options Indexes MultiViews

AllowOverride None

Require all granted

</Directory>


Alias /icons/ "icons/"

<Directory "icons">

Options Indexes MultiViews

AllowOverride None

Require all granted

</Directory>

                                                                                     ---end

    

posted @ 2017-03-29 21:38  weida_rong  阅读(173)  评论(0编辑  收藏  举报