php出現(xiàn)403錯誤怎么辦

我們使用http://localhost/test.php進行本機測試,沒有發(fā)現(xiàn)問題,在內(nèi)網(wǎng)測試時,使用IP地址進行訪問,如:http://10.10.50.195/test.php,就出現(xiàn)了403錯誤這個問題。解決這個問題的方法如下:

成都做網(wǎng)站、成都網(wǎng)站建設服務團隊是一支充滿著熱情的團隊,執(zhí)著、敏銳、追求更好,是創(chuàng)新互聯(lián)的標準與要求,同時竭誠為客戶提供服務是我們的理念。創(chuàng)新互聯(lián)建站把每個網(wǎng)站當做一個產(chǎn)品來開發(fā),精雕細琢,追求一名工匠心中的細致,我們更用心!

1、首先修改一下php的配置文件httpd.conf

在原有的位置文件中找到配置節(jié)

<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、然后保存,重啟服務,再訪問就解決了這個問題。

網(wǎng)站欄目:php出現(xiàn)403錯誤怎么辦
文章源于:http://muchs.cn/article0/pdgpoo.html

成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供電子商務網(wǎng)站改版、營銷型網(wǎng)站建設、外貿(mào)網(wǎng)站建設、手機網(wǎng)站建設網(wǎng)站收錄

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉載內(nèi)容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉載,或轉載時需注明來源: 創(chuàng)新互聯(lián)

營銷型網(wǎng)站建設