php Undefined variable and Undefined index_PHP tutorial

WBOY
Release: 2016-07-13 10:53:53
Original
793 people have browsed it

php tutorial undefined variable and undefined index

This problem occurs because the variable is undefined. We only need to add a verification such as

$a =isset($_get['aa'])?$_get['aa']:'Variable is undefined';

In this way, undefined variables will not appear undefined variable and undefined index
Yes, we also provide methods to set error not prompting in php ini or php


Solution:
1) error_reporting settings:
Find error_reporting = e_all
Modify to error_reporting = e_all & ~e_notice

2) register_globals settings:
Find register_globals = off
Modify to register_globals = on

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/632357.htmlTechArticlephp tutorial undefined variable and undefined index This problem occurs because the variable is undefined. We only need to add a verification such as $a =isset($_get['aa'])?$_get['aa']:'Variable is not defined'; This is not...
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