打开Apache中的httpd.conf找到<Directory "D:/wamp/www/">这个标签,我的安装在D盘,C盘下的路径为<Directory "C:/wamp/www/">,
<Directory "D:/wamp/www/">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# AllowOverride FileInfo AuthConfig Limit
#
AllowOverride all
Require all granted
#
# Controls who can get stuff from this server.
#
# onlineoffline tag - don't remove
#Require local
</Directory>
以上只是对本文件修改了两处,红色部分就是,添加 Require all granted,并且注释Require local最后wampserver重新启动服务,你的页面就可以在局域网中可以访问了。