如何设置php.ini实现屏蔽错误,方法是什么
Admin 2022-09-24 群英技术资讯 530 次浏览
1、打开“php.ini”配置文件,在其中搜索“display_errors”项。
2、将“display_errors”项的值设置为“Off”即可关闭所有的PHP错误报告,进而屏蔽所有错误。
实例
; This directive controls whether or not and where PHP will output errors, ; notices and warnings too. Error output is very useful during development, but ; it could be very dangerous in production environments. Depending on the code ; which is triggering the error, sensitive information could potentially leak ; out of your application such as database usernames and passwords or worse. ; For production environments, we recommend logging errors rather than ; sending them to STDOUT. ; Possible Values: ; Off = Do not display any errors ; stderr = Display errors to STDERR (affects only CGI/CLI binaries!) ; On or stdout = Display errors to STDOUT ; Default Value: On ; Development Value: On ; Production Value: Off ; http://php.net/display-errors display_errors = Off
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:mmqy2019@163.com进行举报,并提供相关证据,查实之后,将立刻删除涉嫌侵权内容。
猜你喜欢
本文练习的主题是“编写一个 PHP 程序来交换给定字符串中的第一个和最后一个字符并返回新字符串”。有不少朋友对此感兴趣,下面小编给大家整理和分享了相关知识和资料,易于大家学习和理解,有需要的朋友可以借鉴参考,下面我们一起来了解一下吧。
这篇文章主要介绍了php 使用expat方式解析xml文件操作,结合实例形式分析了PHP使用expat方式解析xml文件具体步骤与相关操作技巧,需要的朋友可以参考下
首先打开php.ini查看phpinfo()方法是否被禁用,然后把phpinfo()方法从disable_functions中删除掉,重新加载php.ini文件,再通过浏览器访问test.php即可。
今天小编就为大家分享一篇关于PDO::errorCode讲解,小编觉得内容挺不错的,现在分享给大家,具有很好的参考价值,需要的朋友一起跟随小编来看看吧
nginx部署php7项目的方法:1、通过install安装nginx和php7;2、拷贝laravel工程到指定目录并修改配置文档;3、重启nginx即可。
成为群英会员,开启智能安全云计算之旅
立即注册Copyright © QY Network Company Ltd. All Rights Reserved. 2003-2020 群英 版权所有
增值电信经营许可证 : B1.B2-20140078 粤ICP备09006778号 域名注册商资质 粤 D3.1-20240008