Notice: Undefined variable 的解决方法

这是PHP警告信息,是由于未定义变量引起的。

比如:你未设置变量,却在php中用echo $varstr 了,就会出显这种情况,

解决方法:

修改php.ini

将: error_reporting = E_ALL


修改为:error_reporting = E_ALL & ~E_NOTICE


如果什么错误都不想让显示,直接修改:




display_errors = Off


如果你没有php.ini的修改权限,可在php头部加入


ini_set("error_reporting","E_ALL & ~E_NOTICE");

即可

Last modified onSaturday, 05 January 2013 13:21

Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 169
  • Published in 主机
  • Read 3811 times

Notice: Only variables should be assigned by reference in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 478
back to top