Home  >  Article  >  Backend Development  >  How to turn off deprecated in php

How to turn off deprecated in php

coldplay.xixi
coldplay.xixiOriginal
2020-08-11 10:09:146631browse

php method to turn off deprecated: first change the [php.ini] related files, the code is [error_reporting=E_ALL&~E_NOTICE]; then add the relevant code to disable notice error prompts; finally restart apache.

How to turn off deprecated in php

How to turn off deprecated in php:

1. Change error_reporting

# in the php.ini file ##Change to:

error_reporting=E_ALL&~E_NOTICE

If you cannot operate the php.ini file, you can use the following method to achieve it

2. Add the following to the page where you want to disable notice error prompts Code

/* Report all errors except E_NOTICE */
error_reporting(E_ALL ^ E_NOTICE);

Just change it according to this and restart apache

Related learning recommendations:

php programming(video)

The above is the detailed content of How to turn off deprecated in php. 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