cvs: phpdoc-zh /reference/var/functions import-request-variables.xml
| From: | Krazy Nio | Date: | Fri, 02 May 2003 13:33:39 +0000 |
| Subject: | cvs: phpdoc-zh /reference/var/functions import-request-variables.xml | ||
| Groups: | php.doc.zh | ||
| Request: | Send a blank email to doc-zh+get-1410@lists.php.net to get a copy of this message | ||
nio Fri May 2 09:33:39 2003 EDT
Added files:
/phpdoc-zh/reference/var/functions import-request-variables.xml
Log:
Add file
Index: phpdoc-zh/reference/var/functions/import-request-variables.xml
+++ phpdoc-zh/reference/var/functions/import-request-variables.xml
<?xml version="1.0" encoding="gb2312"?>
<!-- $Revision: 1.1 $ -->
<!-- $Author: nio $ -->
<!-- EN-Revision: 1.8 Maintainer: nio Status: ready -->
<!-- splitted from ./en/functions/var.xml, last change in rev 1.34 -->
<refentry id="function.import-request-variables">
<refnamediv>
<refname>import_request_variables</refname>
<refpurpose>½« GET£¯POST£¯Cookie
±äÁ¿µ¼È뵽ȫ¾Ö×÷ÓÃÓòÖÐ</refpurpose>
</refnamediv>
<refsect1>
<title>ÃèÊö</title>
<methodsynopsis>
<type>bool</type><methodname>import_request_variables</methodname>
<methodparam><type>string</type><parameter>types</parameter></methodparam>
<methodparam
choice="opt"><type>string</type><parameter>prefix</parameter></methodparam>
</methodsynopsis>
<simpara>
½« GET£¯POST£¯Cookie
±äÁ¿µ¼È뵽ȫ¾Ö×÷ÓÃÓòÖС£Èç¹ûÄã½ûÖ¹ÁË
<link
linkend="ini.register-globals">register_globals</link>£¬µ«ÓÖÏëÓõ½Ò»Ð©È«¾Ö±äÁ¿£¬ÄÇô´Ëº¯Êý¾ÍºÜÓÐÓá£
</simpara>
<simpara>
Äã¿ÉÒÔʹÓà <parameter>types</parameter>
²ÎÊýÖ¸¶¨ÐèÒªµ¼ÈëµÄ±äÁ¿¡£¿ÉÒÔÓÃ×Öĸ¡®G¡¯¡¢¡®P¡¯ºÍ¡®C¡¯·Ö±ð±íʾ
GET¡¢POST ºÍ
Cookie¡£ÕâЩ×Öĸ²»Çø·Ö´óСд£¬ËùÒÔÄã¿ÉÒÔʹÓá®g¡¯¡¢¡®p¡¯ºÍ¡®c¡¯µÄÈκÎ×éºÏ¡£POST
°üº¬ÁËͨ¹ý POST
·½·¨ÉÏ´«µÄÎļþÐÅÏ¢¡£×¢ÒâÕâЩ×ÖĸµÄ˳Ðò£¬µ±Ê¹Óá°gp¡±Ê±£¬POST
±äÁ¿½«Ê¹ÓÃÏàͬµÄÃû×Ö¸²¸Ç GET ±äÁ¿¡£ÈκΠGPC
ÒÔÍâµÄ×Öĸ¶¼½«±»ºöÂÔ¡£
</simpara>
<simpara>
<parameter>prefix</parameter>
²ÎÊý×÷Ϊ±äÁ¿ÃûµÄǰ׺£¬ÖÃÓÚËùÓб»µ¼È뵽ȫ¾Ö×÷ÓÃÓòµÄ±äÁ¿Ö®Ç°¡£ËùÒÔÈç¹ûÄãÓиöÃûΪ¡°userid¡±µÄ
GET
±äÁ¿£¬Í¬Ê±ÌṩÁË¡°pref_¡±×÷Ϊǰ׺£¬ÄÇôÄ㽫»ñµÃÒ»¸öÃûΪ
$pref_userid
µÄÈ«¾Ö±äÁ¿¡£
</simpara>
<simpara>
Èç¹ûÄã¶Ôµ¼ÈëÆäËüÈ«¾Ö±äÁ¿£¨ÀýÈç SERVER
±äÁ¿£©¸ÐÐËȤ£¬Ç뿼ÂÇʹÓÃ
<function>extract</function>¡£
</simpara>
<note>
<para>
ËäÈ» <parameter>prefix</parameter>
²ÎÊýÊÇ¿ÉÑ¡µÄ£¬µ«Èç¹û²»Ö¸¶¨Ç°×º£¬»òÕßÖ¸¶¨Ò»¸ö¿Õ×Ö·û´®×÷Ϊǰ׺£¬Ä㽫»ñµÃÒ»¸ö
<link linkend="internal.e-notice">E_NOTICE</link>
¼¶±ðµÄ´íÎó¡£Ê¹ÓÃĬÈÏ<link
linkend="ini.error-reporting">´íÎ󱨸æ</link>¼¶±ðÊDz»ÏÔʾעÒ⣨Notice£©¼¶±ðµÄ´íÎóµÄ¡£
</para>
</note>
<informalexample>
<programlisting role="php">
<![CDATA[
// ´Ë´¦½«µ¼Èë GET ºÍ POST ±äÁ¿
// ʹÓá°rvar_¡±×÷Ϊǰ׺
import_request_variables("gP", "rvar_");
print $rvar_foo;
]]>
</programlisting>
</informalexample>
<simpara>
²Î¼û
<link linkend="reserved.variables.request">$_REQUEST</link>¡¢<link
linkend="ini.register-globals">register_globals</link>¡¢<link
linkend="language.variables.predefined">Ô¤¶¨Òå±äÁ¿</link>
ºÍ <function>extract</function>¡£
</simpara>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->