iis7 php 错误提示怎么设置
2022-12-02 09:01:16
85
{{single.collect_count}}

iis7 php设置错误提示的方法:1、修改PHP配置文件内容为“display_errors = on;”;2、在网站根目录添加web.config文件即可。

php入门到就业线上直播课:进入学习
Apipost = Postman + Swagger + Mock + Jmeter 超好用的API调试工具:点击使用

本文操作环境:windows7系统、PHP7.1版,DELL G3电脑

iis7 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视频教程

以上就是iis7 php 错误提示怎么设置的详细内容,更多请关注php中文网其它相关文章!

回帖
全部回帖({{commentCount}})
{{item.user.nickname}} {{item.user.group_title}} {{item.friend_time}}
{{item.content}}
{{item.comment_content_show ? '取消' : '回复'}} 删除
回帖
{{reply.user.nickname}} {{reply.user.group_title}} {{reply.friend_time}}
{{reply.content}}
{{reply.comment_content_show ? '取消' : '回复'}} 删除
回帖
收起
没有更多啦~
{{commentLoading ? '加载中...' : '查看更多评论'}}