When running PHP, Notice: Useofundefinedconstantassumed is prompted by PHP instead of an error. PHP can be directly used without declaring the variable in advance, but a prompt will be prompted if the variable is not declared. Generally, when a website is a formal website, it will turn off the prompt and even the error message. How can this problem be solved? 1. Disable PHP
When running PHP, Notice: Use of undefined constant assumed is prompted by PHP instead of an error. PHP can be directly used without declaring the variable in advance, but a prompt will be prompted if the variable is not declared. Generally, when a website is a formal website, it will turn off the prompt and even the error message. How can this problem be solved? 1. Disable PHP
PHP runningNotice: Use of undefined constant assumed
These are the prompts of PHP, rather than the error. PHP itself does not need to be notified in advance.Declare VariablesYou can use it directly, but there will be a prompt for undeclared variables. In general, as a formal website, the system will turn off the prompts or even connectError MessageIt is also disabled.
How can this be solved?
1,PHP disabling promptMethod
Search php. ini: phpnow with php-apache2handler.inierror_reporting = E_ALL changed to: error_reporting = E_ALL &~ E_NOTICE
2. Add each file header
error_reporting(0);
Original article address: Notice: Use of undefined constant assumed appears during PHP running. Thank you for sharing it with the original author.