php.ini中屏蔽所有错误的方法
2023-09-14 08:57:34 时间
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
以上就是php.ini中屏蔽所有错误的方法,希望对大家有所帮助。
相关文章
- 网易邮件发送不出去的错误代码详解 (MI:SFQ错误等)
- MyEclipse安装Eclipse Memory Analyzer插件,并进行错误文件分析流程
- 解决编译内核模块helloworld.c:1: 错误:代码模式‘kernel’在 32 位模式下不受支持问题,未编译对64位的支持
- PHP错误级别 error_reporting() 函数详解
- 【PHP面向对象(OOP)编程入门教程】18.__call()处理调用错误
- PHP Socket编程 之 php cc攻击代码与防范方法
- x264代码剖析(四):vs2010编译x264错误集锦
- php:在linux上用sudo提升权限(centos 8 / PHP 7.4.2)
- php类库PHP QR Code 二维码
- Relearning PHP (2) – php 的浮点数float
- 解决php configure: error: Cannot find ldap libraries in /usr/lib.错误
- java struts2入门学习---中文验证、对错误消息的分离、结果(result)类型细节配置
- php:在linux上用sudo提升权限(centos 8 / PHP 7.4.2)
- LZW算法PHP实现方法 lzw_decompress php
- 解决php configure: error: Cannot find ldap libraries in /usr/lib.错误
- [php-src]一个Php扩展的结构
- 开发新手最容易犯的50个 Ruby on Rails 错误(1)
- 成功解决启动SQLServer失败——根据不同错误信息判断错误故障进而解决问题
- PHP面试题:php读取文件内容的几种方法和函数?
- [usb_cam-1] process has died, 通过ros 运行usb_cam时出现错误?