WAMP未在目录列表中显示图标 [英] WAMP is not displaying the icons in the directory listing

查看:86
本文介绍了WAMP未在目录列表中显示图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

过去,我通过vmware处理PHP代码,但最近我决定切换为通过WAMP(在Windows 8.1上)在本地进行处理.

In the past I have worked with my PHP code through vmware, but I recently decided to switch to doing it locally through WAMP (on Windows 8.1).

  1. 我在www文件夹中创建了一个空文件夹tests.
  2. 然后在浏览器中,输入http://localhost/tests
  1. I created an empty folder tests in the www folder.
  2. Then on my browser, I typed http://localhost/tests

一切都很好,除了不显示图标图标.这是一张图片,展示了我的意思:

Everything is fine except that the icons icons are not displayed. Here is a picture demonstrating what I mean:

是否有办法使这些图标正确显示?

Is there a way to get these icons to display correctly?

推荐答案

这与Apache索引器配置文件有关.它是Wamp安装程序的错误.它不会修改httpd-autoindex.conf配置文件以指向您指定的Wamp目录.

This has to do with the Apache indexer config file. Its a bug with the Wamp installer. It does not modify the httpd-autoindex.conf configuration file to point to the Wamp directory you specified.

查找httpd-autoindex.conf并更改路径以指向图标所在的位置.在我的WampServer上,它们位于c:/wamp/bin/apache/apache2.4.9/icons.

Look in httpd-autoindex.conf and change the paths to point to where the icons are located. On my WampServer, they are located in c:/wamp/bin/apache/apache2.4.9/icons.

这是您需要更改的httpd-autoindex.conf的相关区域:

Here's the relevant area of httpd-autoindex.conf you need to change:

#Comment out and change below to appropriate icon path
#Alias /icons/ "c:/Apache24/icons/"
Alias /icons/ "c:/wamp/bin/apache/apache2.4.9/icons/"

#Comment out and change below to appropriate icon path
#Directory "c:/Apache24/icons">
<Directory "c:/wamp/bin/apache/apache2.4.9/icons/">
    Options Indexes MultiViews
    AllowOverride None
    Require all granted
</Directory>

默认情况下,WampServer应该已经启用了httpd.conf中的精美目录列表.如果将其注释掉,请启用它们:

By default, WampServer should already have enabled the fancy directory listing in httpd.conf. If they are commented out, enable them:

LoadModule autoindex_module modules/mod_autoindex.so

Include conf/extra/httpd-autoindex.conf

进行这些更改后,别忘了重新启动Apache.

Don't forget to reboot Apache after making these changes.

这篇关于WAMP未在目录列表中显示图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆