From 9daae4409fb2c89544b589a97966d7298115a7f3 Mon Sep 17 00:00:00 2001 From: Gabor Hojtsy Date: Sun, 11 Nov 2001 11:28:56 +0000 Subject: [PATCH] Adding documentation for import_request_variables with example git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@61971 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/var.xml | 59 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/functions/var.xml b/functions/var.xml index bb4247fc74..905a987a34 100644 --- a/functions/var.xml +++ b/functions/var.xml @@ -1,5 +1,5 @@ - + Variable Functions Variables @@ -293,6 +293,63 @@ echo get_resource_type($doc->doc)."\n"; + + + 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 uploaded file informations. Note, that the + order of the letters matters, as using "gp", the POST + variables will overwrite GET variables with the same + name. Any other other letters then GPC are discarded. + + + + Although the prefix argument is + optional, you will get a 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. + + + + +// This will import GET and POST vars +// with an "rvar_" prefix +import_request_variables("gP", "rvar_"); + + + + See also register_globals + and track_vars. + + + + intval