Jquery中文网 新宝娱乐城官网 www.z5nka.com.cn
Jquery中文网 >  脚本编程  >  php  >  正文 PHP错误:Forbidden You don't have permission to access / on this server

新宝娱乐时时彩:PHP错误:Forbidden You don't have permission to access / on this server

发布时间:2018-06-04   编辑:新宝娱乐城官网 www.z5nka.com.cn
测试php程序时出现问题:Forbidden You don't have permission to access / on this server.

新宝娱乐城官网 www.z5nka.com.cn 用//localhost/test.php进行的测试,没有发现问题,后来要在内网测试一下就要用IP地址进行那个访问了,如://10.10.50.195/test.php,就出现了这个问题。
修改一下php的配置文件httpd.conf。
在原有的位置文件中找到配置节:
 

复制代码 代码示例:
<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Satisfy all
</Directory>
 

修改成:
 

复制代码 代码示例:
<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
#    Deny from all
    Allow from all
#允许所有访问
    Satisfy all
</Directory>

还有:
 

复制代码 代码示例:
<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
    # //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>
 

修改成:
 

复制代码 代码示例:
<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
    # //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
</Directory>
 

然后保存,重启服务,再次访问时发现问题已解决了。

您可能感兴趣的文章:
nagios访问apache权限问题的解决方法
jQuery 开发者应该注意的9个错误
jQuery + Adobe Flash integration plugin
Input Placeholder
纯JAVASCRIPT图表动画插件Highcharts Examples
Mac-Style Drop Down Menu
Starting MySQL...The server quit without updating PID file的解决方法
php报错Permission denied的解决一法
jQuery模板技术和数据绑定实现代码
jQuery SOAP Client

关键词: php报错  php错误   
[关闭]
  • 王烜:当心单边主义在全球圈粉 2019-05-20
  • 天津170万亩夏粮收购展开 优质小麦收购价每公斤2.32元 2019-05-19
  • 2018 Yorkville Exotic Car Show kicks off in Toronto - Culture News - CQNEWS 2019-05-19
  • 一张图揭国产航母海试 新航母到底“新”在哪儿 2019-05-19
  • 老师您好,本文中的信件内容基本无错误.但现在的00后还会听您怎么在那里教育他怎么做人吗 2019-05-18
  • 【水到渠成共发展】南水润燕赵 江水惠民生 2019-05-18
  • 世界献血日:走近无名英雄“熊猫侠” 2019-05-18
  • 四价流感疫苗获批上市 2019-05-17
  • 看见百姓生活 角落里的理发师 2019-05-17
  • 昨天中国元首才接见了美国国务卿,说中美合作将造福于两国人民和世界人民。风雨同舟,靠不住啊。 2019-05-16
  • 学习新思想 千万师生同上一堂课 2019-05-16
  • 春夏季养生小常识 饮食一定要注意五多五少-美食资讯 2019-05-15
  • 美媒评选全球五大最危险核潜艇 中国无一入选 2019-05-15
  • 中共中央政治局召开会议 决定召开十九届二中全会 2019-05-15
  • 应战美国贸易战中国跟500亿 同等力度、同日开征关税 2019-05-14
  • 373| 618| 380| 647| 668| 205| 669| 666| 752| 413|