search
HomeBackend DevelopmentPHP ProblemWhat is the method to modify the php.ini file to turn off warning errors?

The method to modify the php.ini file to turn off warning errors is: first open the php.ini configuration file in the php installation directory; then find [display_errors=on]; and finally modify [display_errors=off].

What is the method to modify the php.ini file to turn off warning errors?

The operating environment of this article: windows10 system, php 7.3, thinkpad t480 computer.

To turn off warning errors in PHP, the simplest way is to add the following code directly to the PHP program code:

error_reporting(E_ALL^E_NOTICE^E_WARNING);

The above can turn off all notice and warning level errors.

Put this statement in the function include file of your script, usually config.php or conn.php to control the output.

Of course we can also set it in php.ini as follows:

Open the php.ini file in the PHP installation directory;

Find display_errors = On and change it to display_errors = off.

Related video sharing: php video tutorial

The above is the detailed content of What is the method to modify the php.ini file to turn off warning errors?. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
如何解决Python的函数未定义错误?如何解决Python的函数未定义错误?Jun 24, 2023 pm 01:51 PM

Python是一种面向对象的高级编程语言,具有简单、易读、易学等特点,因此被广泛应用于数据分析、人工智能、网站开发等领域。在Python编程过程中,我们常常会遇到函数未定义的错误,本文将介绍如何解决这个问题。定义函数首先,我们需要明确函数未定义错误的原因:通常是因为我们忘记或者未正确地定义某个函数。因此,我们需要检查代码中是否包含所有需要定义的函数,并确保它

如何在iPhone上启用“敏感内容警告”并了解其功能如何在iPhone上启用“敏感内容警告”并了解其功能Sep 22, 2023 pm 12:41 PM

特别是在过去十年中,移动设备已成为与朋友和家人分享内容的主要方式。易于访问、易于使用的界面以及实时捕获图像和视频的能力使其成为制作和共享内容的绝佳选择。但是,恶意用户很容易滥用这些工具来转发不需要的敏感内容,这些内容可能不适合查看并未经您的同意。为了防止此类情况发生,iOS17中引入了带有“敏感内容警告”的新功能。让我们来看看它以及如何在iPhone上使用它。新的“敏感内容警告”是什么,它是如何工作的?如上所述,敏感内容警告是一项新的隐私和安全功能,旨在帮助防止用户查看敏感内容,包括iPhone

wifi显示隐私警告是什么意思wifi显示隐私警告是什么意思Jun 09, 2023 am 10:21 AM

wifi显示隐私警告是因为加入的网络没有密码或密码太简单,以及被盗用等导致的,其解决办法:给无线路由器设置更加复杂的密码即可。

php.ini怎么关闭缓存php.ini怎么关闭缓存Mar 15, 2021 am 09:35 AM

php.ini关闭缓存的方法:1、找到并打开php.ini配置文件;2、找到“opcache.enable”和“opcache.enable_cli”选项,将其修改为“opcache.enable=0”和“opcache.enable_cli=0”;3、保存修改后的文件即可。

怎样解决在 Windows 11/10 中缺失或找不到 Xlive.dll 的问题?怎样解决在 Windows 11/10 中缺失或找不到 Xlive.dll 的问题?May 08, 2023 pm 08:55 PM

<p>Xlive.dll是Microsoft的一个动态链接库(DLL),它是“WindowsLive游戏”的一部分。由Xlive.dll引起的错误可能是由于Xlive.dll文件的删除、放错位置、被恶意软件损坏或注册表项搞砸了。由于此错误而无法启动程序或游戏可能会令人沮丧。让我们看看解决这个问题的方法。此问题通常可以通过正确重新安装Xlive.dll文件来解决。</p><p><strong&

如何解决Python的最大递归深度错误?如何解决Python的最大递归深度错误?Jun 24, 2023 pm 02:48 PM

Python是一门易学易用的编程语言,然而在使用Python编写递归函数时,可能会遇到递归深度过大的错误,这时就需要解决这个问题。本文将为您介绍如何解决Python的最大递归深度错误。1.了解递归深度递归深度是指递归函数嵌套的层数。在Python默认情况下,递归深度的限制是1000,如果递归的层数超过这个限制,系统就会报错。这种报错通常称为“最大递归深度错误

如何解决Python的缩进错误?如何解决Python的缩进错误?Jun 24, 2023 pm 12:19 PM

Python是一种非常流行的编程语言,由于其简洁明了的语法、易于学习以及丰富的生态系统得到了广泛的应用。然而,由于Python采用缩进作为代码块的标识,所以在编写Python程序的过程中,很容易遇到缩进错误的问题。缩进错误的原因可能是拼写错误、恰当使用缩进或可读性不好,这可能会导致代码运行失败或出现意想不到的结果。因此,在想要解决Python缩进错误的时候,

NotImplementedError:如何解决Python未实现方法错误?NotImplementedError:如何解决Python未实现方法错误?Jun 24, 2023 pm 02:16 PM

在Python编程中,当我们想要调用一个尚未实现的方法时,会出现NotImplementedError的错误提示。这个错误可以让我们感到困惑,因为它并没有明确告诉我们如何解决它。在本文中,我们将探讨NotImplementedError的原因,并提供一些解决方法,帮助您克服此错误。什么是NotImplementedError?NotImplementedEr

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

Repo: How To Revive Teammates
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.