PHP 出现Notice: Use of undefined constant 的解决方案
2010-07-19 09:44
543 查看
进入网站会出现大量类似下面的提示,但是可以正常显示和运行1 u" Y+ M(
p0 ]& q
Notice: Use of undefined constant webshop-
assumed 'webshop' in d:/wapm/www/webshop/logindo.php on line 7...
b
答案:这些是 PHP
的提示而非报错,PHP 本身不需要事先声明变量即可直接使用,但是对未声明变量会有提示。一般作为正式的网站会把提示关掉的,甚至连错误信息也被关掉* r% @+ I( }4 a4 D0 K
# d
关闭 PHP 提示的方法
# e
搜索php.ini:
error_reporting = E_ALL9 /5 B. C( m+ I% S
改为:+ i8 Q, o7 Z4 R) J' T
error_reporting =
E_ALL & ~E_NOTICE
p0 ]& q
Notice: Use of undefined constant webshop-
assumed 'webshop' in d:/wapm/www/webshop/logindo.php on line 7...
b
答案:这些是 PHP
的提示而非报错,PHP 本身不需要事先声明变量即可直接使用,但是对未声明变量会有提示。一般作为正式的网站会把提示关掉的,甚至连错误信息也被关掉* r% @+ I( }4 a4 D0 K
# d
关闭 PHP 提示的方法
# e
搜索php.ini:
error_reporting = E_ALL9 /5 B. C( m+ I% S
改为:+ i8 Q, o7 Z4 R) J' T
error_reporting =
E_ALL & ~E_NOTICE
相关文章推荐
- PHP 出现Notice: Use of undefined constant 的解决方案
- [转]PHP运行出现Notice : Use of undefined constant 的完美解决方案
- PHP运行出现Notice : Use of undefined constant 的完美解决方案分享
- PHP运行出现Notice : Use of undefined constant 的完美解决方案
- PHP运行出现Notice : Use of undefined constant 的完美解决方案
- PHP运行出现Notice : Use of undefined constant 的完美解决方案分享
- PHP运行出现Notice : Use of undefined constant 的完美解决方案分享
- PHP运行出现Notice : Use of undefined constant 完美解决方案
- PHP运行出现Notice : Use of undefined constant 的完美解决方案
- PHP运行出现Notice : Use of undefined constant 的完美解决方案
- PHP 出现Notice: Use of undefined constant 的解决方案
- PHP运行出现Notice : Use of undefined constant 的完美解决方案
- PHP运行出现Notice : Use of undefined constant 的完美解决方案
- PHP运行出现Notice : Use of undefined constant 的完美解决方案
- PHP运行出现Notice : Use of undefined constant 的完美解决方案分享
- PHP运行出现Notice : Use of undefined constant 的解决方法
- PHP运行出现Notice : Use of undefined constant 的解决办法
- PHP运行出现Notice : Use of undefined constant 的解决办法
- php出现Notice: Use of undefined constant.....问题的解决方法
- PHP运行出现Notice : Use of undefined constant 的解决办法