The literal meaning is an undefined index, which is generally caused by the inaccuracy of the developer's judgment. Generally, the running of the program is not affected. For specific solutions, refer.
The literal meaning is an undefined index, which is generally caused by the inaccuracy of the developer's judgment. Generally, the running of the program is not affected. For specific solutions, refer.
Method 1: If normal execution of the program is not affected, use the blocking method.
You can add
Error_reporting (E_ALL ^ E_NOTICE );
Disable NOTICE error warning
Method 2: locate the Specific Row and solve the problem as prompted.
For example, elseif ($ _ POST ['strue'] = 'OK'), a Hong Kong Vm, such as the code above, Hong Kong Space, has not submitted the istrue, so there must be a problem.
You can use the following code to solve the problem:
First Judge
The Code is as follows:
If (array_key_exists ('strue ', $ _ POST ))
{
If ($ _ POST ['strue'])
{
$ Istrue = $ _ POST ['strue'];
}
} Else {
$ Istrue = '';
}
The following judgment can be made:
The Code is as follows:
Elseif ($ istrue = 'OK ')
To avoid such errors, you can refer to some program systems for the Hong Kong Space.
For details, refer to the dedecms live phpcms code.
The Code is as follows:
// Check and register external submitted Variables
Foreach ($ _ REQUEST as $ _ k => $ _ v)
{
If (strlen ($ _ k)> 0 & eregi ('^ (cfg _ | GLOBALS)', $ _ k ))
{
Exit ('request var not allow! ');
}
}
Function _ RunMagicQuotes (& $ svar)
{
If (! Get_magic_quotes_gpc ())
{
If (is_array ($ svar ))
{
Foreach ($ svar as $ _ k = >$ _ v) $ svar [$ _ k] = _ RunMagicQuotes ($ _ v );
}
Else
{
$ Svar = addslashes ($ svar );
}
}
Return $ svar;
}
Foreach (Array ('_ get',' _ Post', '_ COOKIE') as $ _ request)
{
Foreach ($ _ request as $ _ k = >$ _ v) $ {$ _ k} = _ RunMagicQuotes ($ _ v );
}
If (empty ($ istrue ))
{
$ Istrue = '';
}