Home >Backend Development >PHP Tutorial >What does undefined mean? Summary of ways to solve undefined index in php.
1. Modify
error_reporting = E_ALL
in the php.ini file to
error_reporting = E_ALL & ~E_NOTICE
2. Use the code
ini_set( 'error_reporting', E_ALL ^ E_NOTICE );
ini_set ( 'display_errors', '0′ );
3. Use @ to suppress errors
@$name = $_GET['name'];
4. Make judgments
if( !empty($ _GET['name']) ) $name = $_GET['name'];
The above introduces what undefined means and a summary of PHP's methods to solve undefined index. , including the meaning of undefined, I hope it will be helpful to friends who are interested in PHP tutorials.