cvs: phpdoc /en/functions var.xml

From: Date: Sun, 11 Nov 2001 11:28:56 +0000
Subject: cvs: phpdoc /en/functions var.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969338663@lists.php.net to get a copy of this message
goba Sun Nov 11 06:28:56 2001 EDT Modified files: /phpdoc/en/functions var.xml Log: Adding documentation for import_request_variables with example Index: phpdoc/en/functions/var.xml diff -u phpdoc/en/functions/var.xml:1.74 phpdoc/en/functions/var.xml:1.75 --- phpdoc/en/functions/var.xml:1.74 Sat Nov 10 16:49:42 2001 +++ phpdoc/en/functions/var.xml Sun Nov 11 06:28:56 2001 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.74 $ --> +<!-- $Revision: 1.75 $ --> <reference id="ref.var"> <title>Variable Functions</title> <titleabbrev>Variables</titleabbrev> @@ -290,6 +290,63 @@ </programlisting> </informalexample> </para> + </refsect1> + </refentry> + + <refentry id="function.import-request-variables"> + <refnamediv> + <refname>import_request_variables</refname> + <refpurpose>Import GET/POST/Cookie variables into the global scope</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>bool <function>import_request_variables</function></funcdef> + <paramdef>string <parameter>types</parameter></paramdef> + <paramdef>string + <parameter><optional>prefix</optional></parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <simpara> + Imports GET/POST/Cookie variables into the global scope. It is + useful if you disabled + <link linkend="ini.register-globals">register_globals</link>, + but would like to see some variables in the global scope. + </simpara> + <simpara> + Using the <parameter>types</parameter> 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. + </simpara> + <note> + <para> + Although the <parameter>prefix</parameter> 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. + </para> + </note> + <informalexample> + <programlisting role="php"> +// This will import GET and POST vars +// with an "rvar_" prefix +import_request_variables("gP", "rvar_"); + </programlisting> + </informalexample> + <simpara> + See also <link linkend="ini.register-globals">register_globals</link> + and <link linkend="ini.track-vars">track_vars</link>. + </simpara> </refsect1> </refentry>

« previous php.doc (#969338663) next »