admin avatar

Solve the problem that the cPanel host cannot modify the php.ini file

🕝 by admin

Solve the problem that the cPanel host cannot modify the php.ini file

For example, when testing a certain open source software, it keeps reporting errors

1
2
3
4
5
6
7
8
php Notice: Undefined offset 1

php Notice: Undefined offset 2

php Notice: Undefined offset 3

php Notice: Undefined offset 4

cPanel host background host can be modified

error_reporting=E_ALL is error_reporting=E_ALL & ~E_NOTICE

Thus, the error message is completely blocked, so that for those who are obsessed with cleanliness, the error message will not be seen.

But after the modification, it still reports an error, or it is invalid.

In the end, the error message can only be shielded by modifying the error report file

Enter the following code in the header of the error message PHP file

<?php error_reporting (E_ALL ^ E_NOTICE); ?>

💘 相关文章

写一条评论