IIS7下,顯示PHP錯誤(how to display php errors on iis7 or iis7.5)


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

代碼如下:
1
2
display_errors = on;
error_reporting = E_ALL & ~E_NOTICE;

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

代碼如下:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<? xml version = "1.0" encoding = "UTF-8" ?>
<!--
   For more information on how to configure your ASP.NET application, please visit
 
 
   -->
< 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 >

enjoy

來源地址:IIS7下,顯示PHP錯誤(how to display php errors on iis7 or iis7.5)


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM