」。"/> 」。">

首頁  >  文章  >  後端開發  >  iis怎麼顯示php錯誤

iis怎麼顯示php錯誤

藏色散人
藏色散人原創
2021-12-17 10:06:072318瀏覽

iis顯示php錯誤的方法:1、在網站根目錄新增web.config檔;2、設定碼為「561085878ec176adf919ec562fac9a91」。

iis怎麼顯示php錯誤

本文操作環境:Windows7系統,PHP5.6版,Dell G3電腦。

iis怎麼顯示php錯誤?

IIS7下,顯示PHP錯誤:

事實上,我們都知道設置php顯示錯誤,但是在iis7/7.5下,還需要額外的配置。

首先看php的設定:

 

display_errors = on;
error_reporting = E_ALL & ~E_NOTICE;

 

 

 

iis的配置, 注意你首先需要在你的網站根目錄加入web.config檔:

程式碼如下:

 

<?xml version="1.0" encoding="UTF-8"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
 
http://go.microsoft.com/fwlink/?LinkId=169433
 
  -->
<configuration>
  <system.web>
    <compilation debug="true" targetFramework="4.5"/>
    <httpRuntime targetFramework="4.5"/>
  </system.web>
  <system.webServer>
    <httpErrors errorMode="DetailedLocalOnly" existingResponse="PassThrough"></httpErrors>
  </system.webServer>
</configuration>

 

 

 這還真實百度經驗的乾貨。 。

推薦學習:《PHP影片教學

以上是iis怎麼顯示php錯誤的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn