分享

IIS7下,显示PHP错误(how to display php errors on ii...

 枫叶cn 2015-07-27

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)

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多