一个php文件中的undefined index如何去除

WBOY
Release: 2016-06-13 13:33:45
Original
1130 people have browsed it

一个php文件中的undefined index怎么去除
一个php文件中的undefined index怎么去除?在浏览器中老是显示Notice。

------解决方案--------------------
是数组索引还是方法,表达清楚点.

错误意思是找不到index这个东西.


------解决方案--------------------
这是一个提示而不是错误 解决的方法就是加个判断

if (isset()$xxxx){
...
------解决方案--------------------
直接回避 
error_reporting(E_ALL ^ E_NOTICE);

这种方式,并不适合 java 程序员
但是既然是 java 程序员,那么就应该知道:凡是变量都需要先声明,再使用
非要去使用不知是否存在的变量,只能说是人品问题
------解决方案--------------------

探讨

直接回避
error_reporting(E_ALL ^ E_NOTICE);

这种方式,并不适合 java 程序员
但是既然是 java 程序员,那么就应该知道:凡是变量都需要先声明,再使用
非要去使用不知是否存在的变量,只能说是人品问题

------解决方案--------------------
探讨

这是一个提示而不是错误 解决的方法就是加个判断

if (isset()$xxxx){
...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!