A get question. what is my idea about this program?
Add the get parameter when the program is normally accessed to execute the get result.
Such as xxx. php? Login
This type
The code is as follows:
echo "index";if ($_GET['login']){echo "login" ;}
It seems that there is no problem, but even if login is written into the url, the submitted value is still null.
Then, the if statement is still not executed.
In other words, I change if to if ($ _ GET ['login'] = "x ")
Url access? Login is executed.
I cannot understand it. if no operator is added, if is used to judge whether it is null.
Added the value assignment .. (amount, here is the value assignment)
Okay, but I guess xxx. php? Login
What should I do if the specified content is returned?
Reply to discussion (solution)
if (isset($_GET['login'])){ echo "login" ;}
If ($ _ GET ){
Echo key ($ _ GET );
}
echo "index";if (isset($_GET['login'])){ echo "login" ;}
If ($ _ GET ['login'] = "x") can be written successfully, because = is a value assignment operation, which determines whether the value assignment is successful, use = to determine whether the value is equal to or not.
If ($ _ GET ['login'] = "x") can be written successfully, because = is a value assignment operation, which determines whether the value assignment is successful, use = to determine whether the value is equal to or not.