П О Р Т А Л                            
С Е Т Е В Ы Х                          
П Р О Е К Т О В                        
  
Поиск по сайту:
                                                 
Главная

О проекте

Web-мастеру
     HTML & JavaScript
     SSI
     Perl
     PHP
     XML & XSLT
     Unix Shell

MySQL

Безопасность

Хостинг

Другое








Самое читаемое:

Учебник PHP - "Для Чайника".
Просмотров 3511 раз(а).

Иллюстрированный самоучитель по созданию сайтов.
Просмотров 6115 раз(а).

Учебник HTML.
Просмотров 3268 раз(а).

Руководство по PHP5.
Просмотров 5491 раз(а).

Хостинг через призму DNS.
Просмотров 4129 раз(а).

Подборка текстов стандартных документов.
Просмотров 55769 раз(а).

Учебник PHP - Самоучитель
Просмотров 3084 раз(а).

Документация на MySQL (учебник & справочное руководство)
Просмотров 5612 раз(а).

Внешние атаки...
Просмотров 3834 раз(а).

Учебник PHP.
Просмотров 2821 раз(а).

SSI в примерах.
Просмотров 37458 раз(а).



 
 
| Добавить в избранное | Сделать стартовой | Помощь





Руководство по PHP
Пред. След.

import_request_variables

(PHP 4 >= 4.1.0, PHP 5)

import_request_variables -- Import GET/POST/Cookie variables into the global scope

Description

bool import_request_variables ( string types [, string prefix] )

Imports GET/POST/Cookie variables into the global scope. It is useful if you disabled register_globals, but would like to see some variables in the global scope.

Using the types parameter, you can specify which request variables to import. You can use 'G', 'P' and 'C' characters respectively for GET, POST and Cookie. These characters are not case sensitive, so you can also use any combination of 'g', 'p' and 'c'. POST includes the POST uploaded file information. Note that the order of the letters matters, as when using "gp", the POST variables will overwrite GET variables with the same name. Any other letters than GPC are discarded.

The prefix parameter is used as a variable name prefix, prepended before all variable's name imported into the global scope. So if you have a GET value named "userid", and provide a prefix "pref_", then you'll get a global variable named $pref_userid.

If you're interested in importing other variables into the global scope, such as SERVER, consider using extract().

Замечание: Although the prefix parameter is optional, you will get an E_NOTICE level error if you specify no prefix, or specify an empty string as a prefix. This is a possible security hazard. Notice level errors are not displayed using the default error reporting level.

<?php
// This will import GET and POST vars
// with an "rvar_" prefix
import_request_variables("gP", "rvar_");

echo
$rvar_foo;
?>

See also $_REQUEST, register_globals, Predefined Variables, and extract().



Если Вы не нашли что искали, то рекомендую воспользоваться поиском по сайту:
 





Copyright © 2005-2016 Project.Net.Ru