PHP错误:ForbiddenYoudon'thavepermissiontoaccess/onthi_PHP教程
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了PHP错误:ForbiddenYoudon'thavepermissiontoaccess/onthi_PHP教程,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2487字,纯文字阅读大概需要4分钟。
内容图文
![PHP错误:ForbiddenYoudon](/upload/InfoBanner/zyjiaocheng/172/b676a486a9ce46cd9ba83e7f98d365f6.jpg)
Forbidden
You don't have permission to access / on this server.
开始的时候我是用http://localhost/test.php进行的测试,没有发现问题,后来要在内网测试一下就要用IP地址进行那个访问了,如:http://10.10.50.195/test.php,就出现了这个问题。
后来咨询了一下朋友(php高手),说修改一下php的配置文件httpd.conf。
在原有的位置文件中找到配置节
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Satisfy all
修改成
Options FollowSymLinks
AllowOverride None
Order deny,allow
# Deny from all
Allow from all
#允许所有访问
Satisfy all
还有
<Directory "D:/Wamp5/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.2/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:
# Options FileInfo AuthConfig Limit
#
AllowOverride all
#
# Controls who can get stuff from this server.
#
# onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
修改成
<Directory "D:/Wamp5/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.2/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:
# Options FileInfo AuthConfig Limit
#
AllowOverride all
#
# Controls who can get stuff from this server.
#
# onlineoffline tag - don't remove
Order Deny,Allow
# Deny from all
# Allow from 127.0.0.1
Allow from all
然后保存,重启服务,在访问就解决了这个问题。
http://www.bkjia.com/PHPjc/372024.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/372024.htmlTechArticle今天在测试一个php程序的时候,发现这个问题: Forbidden You don't have permission to access / on this server. 开始的时候我是用http://localhost/test.php进行的...
内容总结
以上是互联网集市为您收集整理的PHP错误:ForbiddenYoudon'thavepermissiontoaccess/onthi_PHP教程全部内容,希望文章能够帮你解决PHP错误:ForbiddenYoudon'thavepermissiontoaccess/onthi_PHP教程所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。