PHP 报错 Use of undefined constant prop_values – ass…

问题如下:

PHP 程序 出现下面错误 是什么原因。
Notice: Use of undefined constant multi – assumed ‘multi’ in /www/users/***.com/tb/edittbgoods.php on line 104Notice: Use of undefined constant must – assumed ‘must’ in /www/users/***.com/tb/edittbgoods.php on line 105Notice: Use of undefined constant must – assumed ‘must’ in /www/users/***.com/tb/edittbgoods.php on line 105Notice: Use of undefined constant name – assumed ‘name’ in /www/users/***.com/tb/edittbgoods.php on line 106Notice: Use of undefined constant name – assumed ‘name’ in /www/users/***.com/tb/edittbgoods.php on line 106Notice: Use of undefined constant pid – assumed ‘pid’ in /www/users/***.com/tb/edittbgoods.php on line 107

 

这个不是报错,是说你的定义不规范。
如果没猜错的话你的变量应该是 $xxx[multi] = $xxx;这样的吧。改成$xxx[‘multi’] = $xxx;加上引号应该就可以了。

还有一种解决办法就是修改php.ini 找到error_reporting = E_ALL 改为 error_reporting = E_ALL & ~E_NOTICE。但是还是建议使用第一种解决办法,能规范的尽量规范一些没有坏处。

以上,供参考。

 

原文:http://www.csdn123.net/a/zhidao/20131121pm/195002.htm

Loading

Add a Comment

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.