Home >Backend Development >PHP Problem >How to turn off deprecated in php
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:
1. Change error_reporting
# in the php.ini file ##Change to:error_reporting=E_ALL&~E_NOTICEIf you cannot operate the php.ini file, you can use the following method to achieve it2. 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!