Get or post ways to pass the value of the method

Source: Internet
Author: User
Keywords Php
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.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.