最近玩PHP时总是碰到类似这样的情况
Notice: Use of undefined constant step2- assumed ’step2′ in F:\Internet\htdocs\11\install.php on line 35
Notice: Undefined index: step2 in F:\Internet\htdocs\11\install.php on line 57
这些是 PHP 的提示而非报错,PHP 本身不需要事先声明变量即可直接使用,但是对未声明变量会有提示。
当你的网站正式投入使用时最好关闭错误报告,你可以在你的PHP程序中加上
error_reporting(0);
或者把PHP.INI中的
error_reporting = E_ALL
改为:
