K4:KHTTPQuery
From In-Portal Developers Guide
Path to article:
m (категория) |
Current revision (18:53, 26 November 2010) (view source) (Minor change) |
||
(6 intermediate revisions not shown.) | |||
Line 2: | Line 2: | ||
{| class="vertical-table" | {| class="vertical-table" | ||
| | | | ||
- | [[Image:Http_query.gif|left|frame|none| | + | [[Image:Http_query.gif|left|frame|none|Content of register kHTTPQuery]] |
| | | | ||
- | + | The '''kHTTPQuery''' class is used in K4 for pre-proccessing and then to safely use the following types of data: | |
- | * | + | * data that a user passed to a script |
- | * | + | * data pulled from the [[K4:Environment|Environment Variable]] |
- | * | + | * data from user variables (similar to array [http://lv2.php.net/manual/ru/reserved.variables.php#reserved.variables.globals $_GLOBALS]) |
- | + | As far as user data, we're referring to the content of the following built in PHP arrays: | |
- | # '''$_COOKIE''' - cookies, | + | # '''$_COOKIE''' - cookies, that are stored on the user's computer |
- | # '''$_GET''' - | + | # '''$_GET''' - parameters passed in the address bar of the internet browser |
- | # '''$_POST''' - | + | # '''$_POST''' - values of the fields in a form |
- | # '''$_FILES''' - | + | # '''$_FILES''' - files uploaded through a form |
- | {{TipBox| | + | {{TipBox|Arrays are listed in the order in which they were added to the variables register through this class.}} |
- | + | Also available are arrays $_ENV and $_SERVER, but right now they're not used in K4. | |
|} | |} | ||
- | == | + | == Data Passed by the User (From the Browser) == |
- | + | For user data it's possible to include all variables received from built-in PHP arrays. In the image above, it would be the variables with the following names: | |
- | * | + | * From array $_COOKIE |
<source lang="php">TreeExpandStatus, cookies_on, catalog_active_prefix, adm_sid, __qca</source> | <source lang="php">TreeExpandStatus, cookies_on, catalog_active_prefix, adm_sid, __qca</source> | ||
- | * | + | * From array $_GET |
<source lang="php">env</source> | <source lang="php">env</source> | ||
- | == | + | == User Variables defined by the system == |
<source lang="php">module, section</source> | <source lang="php">module, section</source> | ||
- | == | + | == Parsed Environment Variable == |
- | + | In this example, all the variables that aren't covered, are received as a result of processing the | |
+ | [[K4:Environment|Environment Variable]]. It's easy to determine these variable because their names will contain an underscorce ("<code>_</code>"). | ||
+ | |||
+ | [[en:{{FULLPAGENAME}}]] | ||
+ | [[ru:K4:KHTTPQuery]] |
Current revision
| ||
---|---|---|
Статьи в этой категории | ||
|
The kHTTPQuery class is used in K4 for pre-proccessing and then to safely use the following types of data:
As far as user data, we're referring to the content of the following built in PHP arrays:
Also available are arrays $_ENV and $_SERVER, but right now they're not used in K4. |
Data Passed by the User (From the Browser)
For user data it's possible to include all variables received from built-in PHP arrays. In the image above, it would be the variables with the following names:
- From array $_COOKIE
TreeExpandStatus, cookies_on, catalog_active_prefix, adm_sid, __qca
- From array $_GET
env
User Variables defined by the system
module, section
Parsed Environment Variable
In this example, all the variables that aren't covered, are received as a result of processing the
Environment Variable. It's easy to determine these variable because their names will contain an underscorce ("_
").