Today get a copy of the source code, where get or post pass the value of the method is not understood, completely beyond my php three views.
Example: User Login
First, through the JS jump location.href = "/logon/logon.php?action=logon&user="+username+"&pass="+passwd;
with three parameters, action, user, pass. (This is not discussed in the way that the plaintext and get methods directly pass the account password.) )
And then to logon.php, the head is like this.
`include("include/common.inc");switch ($action){case "": echo "\n"; //form_logon(); break;case "logon": $dbh = db_connect1();。。。。。。。。。`
The $action is judged here. Account password to the words, the program can run, login success.
Obviously, the $action here is obtained, and the value is the value of the action in the URL.
I understand, $action=$_GET['action']
I can understand.
What kind of black technology is used now, can make the get pass parameter a can be directly obtained in the form of $ A.
PS: The system is Custom linux,php version is 5.0.5.
Little Brother, PHP development for just 1 years, has never seen such a writing.
Confirmed the next Windows under the program must not run up.
What is the special configuration file of Linux, can achieve this effect?
Reply content:
Today get a copy of the source code, where get or post pass the value of the method is not understood, completely beyond my php three views.
Example: User Login
First, through the JS jump location.href = "/logon/logon.php?action=logon&user="+username+"&pass="+passwd;
with three parameters, action, user, pass. (This is not discussed in the way that the plaintext and get methods directly pass the account password.) )
And then to logon.php, the head is like this.
`include("include/common.inc");switch ($action){case "": echo "\n"; //form_logon(); break;case "logon": $dbh = db_connect1();。。。。。。。。。`
The $action is judged here. Account password to the words, the program can run, login success.
Obviously, the $action here is obtained, and the value is the value of the action in the URL.
I understand, $action=$_GET['action']
I can understand.
What kind of black technology is used now, can make the get pass parameter a can be directly obtained in the form of $ A.
PS: The system is Custom linux,php version is 5.0.5.
Little Brother, PHP development for just 1 years, has never seen such a writing.
Confirmed the next Windows under the program must not run up.
What is the special configuration file of Linux, can achieve this effect?
PHP gets form variables in three flavors: short, Medium, and lengthy:
Short:;
Medium: $_post[' number '];
Verbose: $HTTP _post_vars[' number ']
The short style requires that the register_globals configuration option be set to ON, but the default is off for security reasons. So it's usually medium in style.
Small yellow Duck Debugging method start with the first line of code, read each line of code and the invocation of each method.