我们运用http://localhost/test.php举行本机测试,没有发现题目,在内网测试时,运用IP地点举行接见,如:http://10.10.50.195/test.php,就涌现了403毛病这个题目。处理这个题目的要领以下:
1、起首修正一下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 # 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>
修正成
<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 </Directory>
2、然后保留,重启效劳,再接见就处理了这个题目。
更多PHP相干学问,请接见ki4网!
以上就是php403毛病的细致内容,更多请关注ki4网别的相干文章!