Notice: Use of undefined constant ALL_PS - assumed ALL_PS in E:Servervhostswww.lvtao.netglobal.php on line 50
Notice: Undefined index: EaseTemplateVer in E:Servervhostswww.lvtao.netlibs emplate.core.php on line 51
Notice: Use of undefined constant uid - assumed uid in E:Servervhostswww.lvtao.netglobal.php on line 54
Notice: Undefined index: uid in E:Servervhostswww.lvtao.netglobal.php on line 54
Notice: Use of undefined constant cuid - assumed cuid in E:Servervhostswww.lvtao.netglobal.php on line 55
Notice: Undefined index: cuid in E:Servervhostswww.lvtao.netglobal.php on line 55
進入網站會出現大量類似下面的提示,但是可以正常顯示和運行
Notice: Use of undefined constant ctbTitle - assumed ctbTitle in d:ctb1.5ctbincludeconfig.php on line 23...
b答案:這些是 PHP 的提示而非報錯,PHP 本身不需要事先聲明變量即可直接使用,但是對未聲明變量會有提示。一般作為正式的網站會把提示關掉的,甚至連錯誤信息也被關掉
關閉 PHP 提示的方法
搜索php.ini:
error_reporting = E_ALL
改為:
error_reporting = E_ALL & ~E_NOTICE
還有個不是辦法的辦法就是
在每個文件頭上加
error_reporting(0); 雖然不好弄但是可以解決問題