Notice: Undefined variable 的解决方法

2010-8-30 杜世伟 Php

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

比如:你未设置变量,却在php中用echo $varstr 了

解决方法:

1.修改php.ini php程序员站

将: error_reporting = E_ALL

修改为:error_reporting = E_ALL & ~E_NOTICE

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

display_errors = Off

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

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

标签: Notice Undefined variable Notice: Undefined variable 的解决方法

Powered by emlog 沪ICP备2023034538号-1