IIS7下,显示PHP错误(不显示500错误,而显示详细错误)
2017-12-01 14:51
411 查看
玛德,IIS就是个坑,害得老子进行摸索了那么久,才找到了解决方法:
1、除了将php.ini配置为:
display_errors = on;
error_reporting = E_ALL & ~E_NOTICE;
2、还要再php网站的根目录下面新建一个web.config文件:
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>
1、除了将php.ini配置为:
display_errors = on;
error_reporting = E_ALL & ~E_NOTICE;
2、还要再php网站的根目录下面新建一个web.config文件:
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>
相关文章推荐
- 让IIS 7显示ASP的详细错误信息-无论什么样的代码错误,只显示“500 - 内部服务器错误解决
- IIS7下,显示PHP错误(how to display php errors on iis7 or iis7.5)
- 让IIS 7显示ASP的详细错误信息-无论什么样的代码错误,只显示“500 - 内部服务器错误解决
- iis8.5显示ASP的详细错误信息500 内部服务器错误解决方法
- 让IIS 7显示ASP的详细错误信息
- IIS7.5显示ASP的详细错误信息”500 – 内部服务器错误解决”
- dedecms后台/dede/login.php登录空白,或无法登陆显示500 错误解决办法
- 造成win2008 500内部错误不能显示详细错误的原因和解决方法
- php出错不显示错误信息反而显示500页面
- iis7下配置php出现404.17错误的解决办法
- 让iis7.5显示php错误的详细信息~
- windows 2012(64位) IIS配置asp程序 500 - 内部服务器错误。您查找的资源存在问题,因而无法显示。
- 造成win2008 500内部错误不能显示详细错误的原因和解决方法
- 造成win2008 500内部错误不能显示详细错误的原因和解决方法
- 兆鹏和你学PHP——PDO调试和浏览器显示500错误
- IIS7下ASP报500错误
- Atitit.dwr3 不能显示错误详细信息的解决方案,控件显示错误详细信息的解决方案 java .net php
- 在iis中发布asp的网站后,只显示登陆页面,其他的页面都不显示,并出现http500内部服务器错误,是怎么回事?
- Atitit.dwr3 不能显示错误详细信息的解决方案,控件显示错误详细信息的解决方案 java .net php
- 关闭iis 错误页面显示详细内容