iis7下,php显示错误的方法:首先在iis7下,需配置php,代码为【display_errors = on】;然后需要在网站根目录添加【web.config】文件,代码为【compilation debug=true..】。
本教程操作环境:windows7系统、php5.6&&iis7版,dell g3电脑。
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视频教程
以上就是iis7下,php如何显示错误的详细内容。