PHP提示Notice: Undefined variable:的解决办法
2012-09-04 09:34
288 查看
Notice: Undefined variable: email in D:\PHP5\ENOTE\ADDNOTE.PHP on line 9
Notice: Undefined variable: subject in D:\PHP5\ENOTE\ADDNOTE.PHP on line 9
Notice: Undefined variable: comment in D:\PHP5\ENOTE\ADDNOTE.PHP on line 9
........
本来php是不需要定义变量的,但是出现这种情况应该怎么办呢?
只要在C:\WINDOWS找出php.ini的
在php.ini中的302行 error_reporting = E_ALL
修改成
error_reporting = E_ALL & ~E_NOTICE再重启apache2.2就行了
解决方法:修改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");
即可
Notice: Undefined variable: subject in D:\PHP5\ENOTE\ADDNOTE.PHP on line 9
Notice: Undefined variable: comment in D:\PHP5\ENOTE\ADDNOTE.PHP on line 9
........
本来php是不需要定义变量的,但是出现这种情况应该怎么办呢?
只要在C:\WINDOWS找出php.ini的
在php.ini中的302行 error_reporting = E_ALL
修改成
error_reporting = E_ALL & ~E_NOTICE再重启apache2.2就行了
解决方法:修改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");
即可
相关文章推荐
- PHP微信公众号服务端提示Notice: Undefined index: HTTP_RAW_POST_DATA in xxxx,且无法正常返回的解决办法
- PHP提示Notice: Undefined variable的解决办法
- PHP提示Notice: Undefined variable: 的解决办法
- PHP提示Notice: Undefined variable的解决办法
- PHP提示Notice: Undefined variable的解决办法
- PHP提示Notice: Undefined variable的解决办法
- PHP提示Notice: Undefined variable的解决办法
- PHP提示Notice: Undefined variable的解决办法
- PHP提示Notice: Undefined variable的解决办法
- PHP提示Notice: Undefined variable的解决办法
- 运行PHP程序时提示“Notice: Undefined index”的解决办法
- PHP提示Notice: Undefined variable的解决办法
- PHP IE下载时提示”无法复制 无法读取源文件或磁盘”的解决办法
- php提示Notice: Undefined index解决方法
- php提示undefined index的几种解决办法
- 安装完Apache和PHP之后访问PHP文件页面提示下载而没有解析 解决办法
- Notice: Use of undefined constant out - assumed 'out' in D:wampwwwdaoruindex.php on line 4解决办法
- PHP IE下载时提示”无法复制 无法读取源文件或磁盘”的解决办法
- php 评论中添加手机表情,提示插入到数据库中出错,有解决办法
- Aptana 2.0.2 php不提示的解决办法