Author: sports98 2002-8-16
After PHP4.1.0, HTTP_GET_VARS is saved using the GET variable. The GET variable mainly comes from the following methods:
For example, the URL that requests the server to obtain information, use the form method as the get method. In this way, all request variables will pass
The URL is passed to the server, and the server calls the relevant interpreter according to the configuration to process these GET variables.
This article discusses how to pass values in url get mode.
We all know that the URL value is URL? Variable name = variable value
? Page = 1
This method is common to us.
If there are more variables, use the '&' symbol to connect to the variable.
Example :? Page = 1 & title = Welcome % 20Sports98
The above method is to convert the variables directly to the corresponding array in the browser, so we don't need to know much about it. The topics I want to discuss are as follows:
? Page = 1, Welcome % 20Sports98, Sports98, 300
In this example, we use the ',' symbol as the variable Separator. Here we can use two methods to implement it,
1. Modify PHP. INI
; List of separator (s) used by PHP to parse input URLs into variables.
; Default is "&".
; NOTE: Every character in this directive is considered as separator!
Arg_separator.input = ";,"
2. Write the explanation Syntax by yourself
List ($ key, $ value) = $ _ GET; // splits the GET variable out.
$ Tmp = explode (",", $ value); // separates data
The advantage of this usage is that others cannot know who is using the value you passed, and you need to understand the usage of each value.