cvs: phpdoc-zh /reference/url/functions base64-decode.xml base64-encode.xml get-headers.xml get-meta-tags.xml http-build-query.xml parse-url.xml
rawurldecode.xml rawurlencode.xml urldecode.xml urlencode.xml

From: Date: Sun, 05 Feb 2006 00:47:02 +0000
Subject: cvs: phpdoc-zh /reference/url/functions base64-decode.xml base64-encode.xml get-headers.xml get-meta-tags.xml http-build-query.xml parse-url.xml
rawurldecode.xml rawurlencode.xml urldecode.xml urlencode.xml
Groups: php.doc.zh 
Request: Send a blank email to doc-zh+get-2774@lists.php.net to get a copy of this message
dallas Sun Feb 5 00:47:02 2006 UTC Added files: /phpdoc-zh/reference/url/functions get-headers.xml Modified files: /phpdoc-zh/reference/url/functions base64-decode.xml base64-encode.xml get-meta-tags.xml http-build-query.xml parse-url.xml rawurldecode.xml rawurlencode.xml urldecode.xml urlencode.xml Log: Updated.

http://cvs.php.net/viewcvs.cgi/phpdoc-zh/reference/url/functions/base64-decode.xml?r1=1.2&r2=1.3&diff_format=u Index: phpdoc-zh/reference/url/functions/base64-decode.xml diff -u phpdoc-zh/reference/url/functions/base64-decode.xml:1.2 phpdoc-zh/reference/url/functions/base64-decode.xml:1.3 --- phpdoc-zh/reference/url/functions/base64-decode.xml:1.2 Thu Jul 14 17:29:43 2005 +++ phpdoc-zh/reference/url/functions/base64-decode.xml Sun Feb 5 00:47:02 2006 @@ -1,51 +1,50 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.2 $ --> -<!-- $Author: yincheng $ --> +<!-- $Revision: 1.3 $ --> +<!-- $Author: dallas $ --> <!-- EN-Revision: 1.7 Maintainer: nio Status: ready --> -<!-- splitted from ./en/functions/url.xml, last change in rev 1.2 --> - <refentry id="function.base64-decode"> - <refnamediv> - <refname>base64_decode</refname> - <refpurpose>¶ÔʹÓà MIME base64 ±àÂëµÄÊý¾Ý½øÐнâÂë</refpurpose> - </refnamediv> - <refsect1> - <title>ÃèÊö</title> - <methodsynopsis> - <type>string</type><methodname>base64_decode</methodname> - <methodparam><type>string</type><parameter>encoded_data</parameter></methodparam> - </methodsynopsis> - <para> - <function>base64_decode</function> ¶Ô - <parameter>encoded_data</parameter> ½øÐнâÂ룬·µ»ØÔ­Ê¼Êý¾Ý£¬Ê§°ÜÔò·µ»Ø - &false;¡£·µ»ØµÄÊý¾Ý¿ÉÄÜÊǶþ½øÖƵġ£ - </para> - <para> - <example> - <title><function>base64_decode</function> ʾÀý</title> - <programlisting role="php"> +<refentry id="function.base64-decode"> + <refnamediv> + <refname>base64_decode</refname> + <refpurpose>¶ÔʹÓà MIME base64 ±àÂëµÄÊý¾Ý½øÐнâÂë</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>string</type><methodname>base64_decode</methodname> + <methodparam><type>string</type><parameter>encoded_data</parameter></methodparam> + </methodsynopsis> + <para> + <function>base64_decode</function> ¶Ô + <parameter>encoded_data</parameter> ½øÐнâÂ룬·µ»ØÔ­Ê¼Êý¾Ý£¬Ê§°ÜÔò·µ»Ø + &false;¡£·µ»ØµÄÊý¾Ý¿ÉÄÜÊǶþ½øÖƵġ£ + </para> + <para> + <example> + <title><function>base64_decode</function> ʾÀý</title> + <programlisting role="php"> <![CDATA[ <?php $str = 'VGhpcyBpcyBhbiBlbmNvZGVkIHN0cmluZw=='; echo base64_decode($str); ?> ]]> - </programlisting> - <para> - ´ËʾÀý½«ÏÔʾ£º - </para> - <screen> + </programlisting> + <para> + ´ËʾÀý½«ÏÔʾ£º + </para> + <screen> <![CDATA[ This is an encoded string ]]> - </screen> - </example> - </para> - <para> - ²Î¼û <function>base64_encode</function> Óë - <ulink url="&url.rfc;2045">RFC 2045</ulink> 6.8 Õ½ڡ£ - </para> - </refsect1> - </refentry> + </screen> + </example> + </para> + <para> + ²Î¼û <function>base64_encode</function> ºÍ + <ulink url="&url.rfc;2045">RFC 2045</ulink> µÄ 6.8 Õ½ڡ£ + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewcvs.cgi/phpdoc-zh/reference/url/functions/base64-encode.xml?r1=1.1&r2=1.2&diff_format=u Index: phpdoc-zh/reference/url/functions/base64-encode.xml diff -u phpdoc-zh/reference/url/functions/base64-encode.xml:1.1 phpdoc-zh/reference/url/functions/base64-encode.xml:1.2 --- phpdoc-zh/reference/url/functions/base64-encode.xml:1.1 Sun Nov 2 14:05:20 2003 +++ phpdoc-zh/reference/url/functions/base64-encode.xml Sun Feb 5 00:47:02 2006 @@ -1,55 +1,55 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.1 $ --> -<!-- $Author: nio $ --> -<!-- EN-Revision: 1.5 Maintainer: nio Status: ready --> +<!-- $Revision: 1.2 $ --> +<!-- $Author: dallas $ --> +<!-- EN-Revision: 1.7 Maintainer: nio Status: ready --> <!-- splitted from ./en/functions/url.xml, last change in rev 1.2 --> - <refentry id="function.base64-encode"> - <refnamediv> - <refname>base64_encode</refname> - <refpurpose>ʹÓà MIME base64 ¶ÔÊý¾Ý½øÐбàÂë</refpurpose> - </refnamediv> - <refsect1> - <title>ÃèÊö</title> - <methodsynopsis> - <type>string</type><methodname>base64_encode</methodname> - <methodparam><type>string</type><parameter>data</parameter></methodparam> - </methodsynopsis> - <para> - <function>base64_encode</function> returns - ʹÓà base64 ¶Ô <parameter>data</parameter> ½øÐбàÂë¡£Éè¼Æ´ËÖÖ±àÂëÊÇΪÁËʹ¶þ½øÖÆÊý¾Ý¿ÉÒÔͨ¹ý·Ç´¿ - 8-bit µÄ´«Êä²ã´«Ê䣬ÀýÈçµç×ÓÓʼþµÄÖ÷Ìå¡£ - </para> - <para> - Base64-encoded Êý¾ÝÒª±ÈԭʼÊý¾Ý¶àÕ¼Óà 33% ×óÓҵĿռ䡣 - </para> - <para> - <example> - <title><function>base64_encode</function> ʾÀý</title> - <programlisting role="php"> +<refentry id="function.base64-encode"> + <refnamediv> + <refname>base64_encode</refname> + <refpurpose>ʹÓà MIME base64 ¶ÔÊý¾Ý½øÐбàÂë</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>string</type><methodname>base64_encode</methodname> + <methodparam><type>string</type><parameter>data</parameter></methodparam> + </methodsynopsis> + <para> + <function>base64_encode</function> returns + ʹÓà base64 ¶Ô <parameter>data</parameter> ½øÐбàÂë¡£Éè¼Æ´ËÖÖ±àÂëÊÇΪÁËʹ¶þ½øÖÆÊý¾Ý¿ÉÒÔͨ¹ý·Ç´¿ + 8-bit µÄ´«Êä²ã´«Ê䣬ÀýÈçµç×ÓÓʼþµÄÖ÷Ìå¡£ + </para> + <para> + Base64-encoded Êý¾ÝÒª±ÈԭʼÊý¾Ý¶àÕ¼Óà 33% ×óÓҵĿռ䡣 + </para> + <para> + <example> + <title><function>base64_encode</function> ʾÀý</title> + <programlisting role="php"> <![CDATA[ <?php $str = 'This is an encoded string'; echo base64_encode($str); ?> ]]> - </programlisting> - <para> - ´ËʾÀý½«ÏÔʾ£º - </para> - <screen> + </programlisting> + <para> + ´ËʾÀý½«ÏÔʾ£º + </para> + <screen> <![CDATA[ VGhpcyBpcyBhbiBlbmNvZGVkIHN0cmluZw== ]]> - </screen> - </example> - </para> - <para> - ²Î¼û - <function>base64_decode</function>¡¢<function>chunk_split</function> Óë - <ulink url="&url.rfc;2045">RFC 2045</ulink> 6.8 Õ½ڡ£ - </para> - </refsect1> - </refentry> + </screen> + </example> + </para> + <para> + ²Î¼û + <function>base64_decode</function>¡¢<function>chunk_split</function>£¬<function>convert_uuencode</function> + ºÍ <ulink url="&url.rfc;2045">RFC 2045</ulink> 6.8 Õ½ڡ£ + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewcvs.cgi/phpdoc-zh/reference/url/functions/get-meta-tags.xml?r1=1.1&r2=1.2&diff_format=u Index: phpdoc-zh/reference/url/functions/get-meta-tags.xml diff -u phpdoc-zh/reference/url/functions/get-meta-tags.xml:1.1 phpdoc-zh/reference/url/functions/get-meta-tags.xml:1.2 --- phpdoc-zh/reference/url/functions/get-meta-tags.xml:1.1 Tue Nov 11 15:16:45 2003 +++ phpdoc-zh/reference/url/functions/get-meta-tags.xml Sun Feb 5 00:47:02 2006 @@ -1,37 +1,36 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.1 $ --> -<!-- $Author: nio $ --> -<!-- EN-Revision: 1.4 Maintainer: nio Status: ready --> -<!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 --> - <refentry id="function.get-meta-tags"> - <refnamediv> - <refname>get_meta_tags</refname> - <refpurpose> - ´ÓÒ»¸öÎļþÖÐÌáÈ¡ËùÓÐµÄ meta ±êÇ© content ÊôÐÔ£¬·µ»ØÒ»¸öÊý×é - </refpurpose> - </refnamediv> - <refsect1> - <title>ÃèÊö</title> - <methodsynopsis> - <type>array</type><methodname>get_meta_tags</methodname> - <methodparam><type>string</type><parameter>filename</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>use_include_path</parameter></methodparam> - </methodsynopsis> - <para> - ´ò¿ª <parameter>filename</parameter> ÖðÐнâÎöÎļþÖÐµÄ - &lt;meta> ±êÇ©¡£´Ë²ÎÊý¿ÉÒÔÊDZ¾µØÎļþÒ²¿ÉÒÔÊÇÒ»¸ö - <acronym>URL</acronym>¡£½âÎö¹¤×÷½«ÔÚ - <literal>&lt;/head&gt;</literal> ´¦Í£Ö¹¡£ - </para> - <para> - ½« <parameter>use_include_path</parameter> ÉèÖÃΪ 1 ½«´Ùʹ - PHP ³¢ÊÔ°´ÕÕ <link linkend="ini.include-path">include_path</link> - ±ê×¼°üº¬Â·¾¶ÖеÄÿ¸öÖ¸ÏòÈ¥´ò¿ªÎļþ¡£ÕâÖ»ÓÃÓÚ±¾µØÎļþ£¬²»ÊÊÓÃÓÚ URL¡£ - </para> - <para> - <example> - <title><function>get_meta_tags</function> ½âÎöЩʲô</title> - <programlisting role="html"> +<!-- $Revision: 1.2 $ --> +<!-- $Author: dallas $ --> +<!-- EN-Revision: 1.7 Maintainer: nio Status: ready --> +<refentry id="function.get-meta-tags"> + <refnamediv> + <refname>get_meta_tags</refname> + <refpurpose> + ´ÓÒ»¸öÎļþÖÐÌáÈ¡ËùÓÐµÄ meta ±êÇ© content ÊôÐÔ£¬·µ»ØÒ»¸öÊý×é + </refpurpose> + </refnamediv> + <refsect1> + <title>ÃèÊö</title> + <methodsynopsis> + <type>array</type><methodname>get_meta_tags</methodname> + <methodparam><type>string</type><parameter>filename</parameter></methodparam> + <methodparam choice="opt"><type>bool</type><parameter>use_include_path</parameter></methodparam> + </methodsynopsis> + <para> + ´ò¿ª <parameter>filename</parameter> ÖðÐнâÎöÎļþÖÐµÄ + &lt;meta&gt; ±êÇ©¡£´Ë²ÎÊý¿ÉÒÔÊDZ¾µØÎļþÒ²¿ÉÒÔÊÇÒ»¸ö + <acronym>URL</acronym>¡£½âÎö¹¤×÷½«ÔÚ + <literal>&lt;/head&gt;</literal> ´¦Í£Ö¹¡£ + </para> + <para> + ½« <parameter>use_include_path</parameter> ÉèÖÃΪ &true; ½«Ê¹ + PHP ³¢ÊÔ°´ÕÕ <link linkend="ini.include-path">include_path</link> + ±ê×¼°üº¬Â·¾¶ÖеÄÿ¸öÖ¸ÏòÈ¥´ò¿ªÎļþ¡£ÕâÖ»ÓÃÓÚ±¾µØÎļþ£¬²»ÊÊÓÃÓÚ URL¡£ + </para> + <para> + <example> + <title><function>get_meta_tags</function> ½âÎöЩʲô</title> + <programlisting role="html"> <![CDATA[ <meta name="author" content="name"> <meta name="keywords" content="php documentation"> @@ -39,47 +38,47 @@ <meta name="geo.position" content="49.33;-86.59"> </head> <!-- ½âÎö¹¤×÷ÔÚ´Ë´¦Í£Ö¹ --> ]]> - </programlisting> - </example> - £¨×¢Òâ»Ø³µ»»ÐÐ £­ PHP ʹÓÃÒ»¸ö±¾µØº¯ÊýÀ´½âÎöÊäÈ룬ËùÒÔ Mac ÉϵÄÎļþ½«²»ÄÜÔÚ Unix ÉÏÕý³£¹¤×÷£©¡£ - </para> - <para> - ·µ»ØµÄ¹ØÁªÊý×éÒÔÊôÐÔ name µÄÖµ×÷Ϊ¼ü£¬ÊôÐÔ content - µÄÖµ×÷Ϊֵ£¬ËùÒÔÄã¿ÉÒÔºÜÈÝÒ×µØÊ¹Óñê×¼Êý×麯Êý±éÀú´Ë¹ØÁªÊý×é»ò·ÃÎÊij¸öÖµ¡£ÊôÐÔ - name ÖеÄÌØÊâ×Ö·û½«Ê¹Óá®_¡¯Ìæ»»£¬¶øÆäËü×Ö·ûÔòת»»³ÉСд¡£Èç¹ûÓÐÁ½¸ö - meta ±êǩӵÓÐÏàͬµÄ name£¬ÔòÖ»·µ»Ø×îºó³öÏÖµÄÄÇÒ»¸ö¡£ - </para> - <para> - <example> - <title><function>get_meta_tags</function> µÄ·µ»ØÖµ</title> - <programlisting role="php"> + </programlisting> + </example> + £¨×¢Òâ»Ø³µ»»ÐÐ £­ PHP ʹÓÃÒ»¸ö±¾µØº¯ÊýÀ´½âÎöÊäÈ룬ËùÒÔ Mac ÉϵÄÎļþ½«²»ÄÜÔÚ Unix ÉÏÕý³£¹¤×÷£©¡£ + </para> + <para> + ·µ»ØµÄ¹ØÁªÊý×éÒÔÊôÐÔ name µÄÖµ×÷Ϊ¼ü£¬ÊôÐÔ content + µÄÖµ×÷Ϊֵ£¬ËùÒÔÄã¿ÉÒÔºÜÈÝÒ×µØÊ¹Óñê×¼Êý×麯Êý±éÀú´Ë¹ØÁªÊý×é»ò·ÃÎÊij¸öÖµ¡£ÊôÐÔ + name ÖеÄÌØÊâ×Ö·û½«Ê¹Óá®_¡¯Ìæ»»£¬¶øÆäËü×Ö·ûÔòת»»³ÉСд¡£Èç¹ûÓÐÁ½¸ö + meta ±êǩӵÓÐÏàͬµÄ name£¬ÔòÖ»·µ»Ø×îºó³öÏÖµÄÄÇÒ»¸ö¡£ + </para> + <para> + <example> + <title><function>get_meta_tags</function> µÄ·µ»ØÖµ</title> + <programlisting role="php"> <![CDATA[ <?php // ¼ÙÉèÉϱߵıêÇ©ÊÇÔÚ www.example.com ÖÐ $tags = get_meta_tags('http://www.example.com/'); // ×¢ÒâËùÓеļü£¨key£©¾ùΪСд£¬¶ø¼üÖеġ®.¡¯Ôòת»»³ÉÁË¡®_¡¯¡£ -print $tags['author']; // name -print $tags['keywords']; // php documentation -print $tags['description']; // a php manual -print $tags['geo_position']; // 49.33;-86.59 +echo $tags['author']; // name +echo $tags['keywords']; // php documentation +echo $tags['description']; // a php manual +echo $tags['geo_position']; // 49.33;-86.59 ?> ]]> - </programlisting> - </example> - </para> - <note> - <para> - ´Ó PHP 4.0.5 ¿ªÊ¼£¬<function>get_meta_tags</function> - Ö§³ÖûÓÐʹÓÃÒýºÅÀ¨ÆðÀ´µÄ HTML ÊôÐÔ¡£ - </para> - </note> - <para> - ²Î¼û <function>htmlentities</function> ºÍ - <function>urlencode</function>¡£ - </para> - </refsect1> - </refentry> + </programlisting> + </example> + </para> + <note> + <para> + ´Ó PHP 4.0.5 ¿ªÊ¼£¬<function>get_meta_tags</function> + Ö§³ÖûÓÐʹÓÃÒýºÅÀ¨ÆðÀ´µÄ HTML ÊôÐÔ¡£ + </para> + </note> + <para> + ²Î¼û <function>htmlentities</function> ºÍ + <function>urlencode</function>¡£ + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewcvs.cgi/phpdoc-zh/reference/url/functions/http-build-query.xml?r1=1.1&r2=1.2&diff_format=u Index: phpdoc-zh/reference/url/functions/http-build-query.xml diff -u phpdoc-zh/reference/url/functions/http-build-query.xml:1.1 phpdoc-zh/reference/url/functions/http-build-query.xml:1.2 --- phpdoc-zh/reference/url/functions/http-build-query.xml:1.1 Tue Nov 11 15:16:45 2003 +++ phpdoc-zh/reference/url/functions/http-build-query.xml Sun Feb 5 00:47:02 2006 @@ -1,34 +1,40 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.1 $ --> -<!-- $Author: nio $ --> -<!-- EN-Revision: 1.0 Maintainer: nio Status: ready --> - <refentry id="function.http-build-query"> - <refnamediv> - <refname>http_build_query</refname> - <refpurpose>Éú³É url-encoded Ö®ºóµÄÇëÇó×Ö·û´®</refpurpose> - </refnamediv> - <refsect1> - <title>ÃèÊö</title> - <methodsynopsis> - <type>string</type><methodname>http_build_query</methodname> - <methodparam><type>array</type><parameter>formdata</parameter></methodparam> - <methodparam choice="opt"><type>string</type><parameter>numeric_prefix</parameter></methodparam> - </methodsynopsis> +<!-- $Revision: 1.2 $ --> +<!-- $Author: dallas $ --> +<!-- EN-Revision: 1.10 Maintainer: nio Status: ready --> +<refentry id="function.http-build-query"> + <refnamediv> + <refname>http_build_query</refname> + <refpurpose>Éú³É URL-encode Ö®ºóµÄÇëÇó×Ö·û´®</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>string</type><methodname>http_build_query</methodname> + <methodparam><type>array</type><parameter>formdata</parameter></methodparam> + <methodparam choice="opt"><type>string</type><parameter>numeric_prefix</parameter></methodparam> + </methodsynopsis> - <simpara> - ʹÓøø³öµÄ¹ØÁª£¨»òϱ꣩Êý×éÉú³ÉÒ»¸ö - url-encoded ÇëÇó×Ö·û´®¡£²ÎÊý - <parameter>formdata</parameter> ¿ÉÒÔÊÇÊý×é»ò°üº¬ÊôÐԵĶÔÏó¡£Ò»¸ö - <parameter>formdata</parameter> - Êý×é¿ÉÒÔÊǼòµ¥µÄһά½á¹¹£¬Ò²¿ÉÒÔÊÇÓÉÊý×é×é³ÉµÄÊý×飨ÆäÒÀ´Î¿ÉÒÔ°üº¬ÆäËüÊý×飩¡£Èç¹ûÔÚ»ù´¡Êý×éÖÐʹÓÃÁËÊý×Öϱêͬʱ¸ø³öÁË - <parameter>numeric_prefix</parameter> ²ÎÊý£¬´Ë²ÎÊýÖµ½«»á×÷Ϊ»ù´¡Êý×éÖеÄÊý×ÖϱêÔªËØµÄǰ׺¡£ÕâÊÇΪÁËÈà - <literal>PHP</literal> »òÆäËü CGI - ³ÌÐòÔÚÉÔºó¶ÔÊý¾Ý½øÐнâÂëʱ»ñÈ¡ºÏ·¨µÄ±äÁ¿Ãû¡£ - </simpara> - - <example> - <title><function>http_build_query</function> ʹÓÃʾÀý</title> - <programlisting role="php"> + <simpara> + ʹÓøø³öµÄ¹ØÁª£¨»òϱ꣩Êý×éÉú³ÉÒ»¸ö¾­¹ý + URL-encode µÄÇëÇó×Ö·û´®¡£²ÎÊý + <parameter>formdata</parameter> ¿ÉÒÔÊÇÊý×é»ò°üº¬ÊôÐԵĶÔÏó¡£Ò»¸ö + <parameter>formdata</parameter> + Êý×é¿ÉÒÔÊǼòµ¥µÄһά½á¹¹£¬Ò²¿ÉÒÔÊÇÓÉÊý×é×é³ÉµÄÊý×飨ÆäÒÀ´Î¿ÉÒÔ°üº¬ÆäËüÊý×飩¡£Èç¹ûÔÚ»ù´¡Êý×éÖÐʹÓÃÁËÊý×Öϱêͬʱ¸ø³öÁË + <parameter>numeric_prefix</parameter> ²ÎÊý£¬´Ë²ÎÊýÖµ½«»á×÷Ϊ»ù´¡Êý×éÖеÄÊý×ÖϱêÔªËØµÄǰ׺¡£ÕâÊÇΪÁËÈà + PHP »òÆäËü CGI + ³ÌÐòÔÚÉÔºó¶ÔÊý¾Ý½øÐнâÂëʱ»ñÈ¡ºÏ·¨µÄ±äÁ¿Ãû¡£ + </simpara> + + <note> + <para> + Óà <link linkend="ini.arg-separator.output">arg_separator.output</link> À´·Ö¸ô²ÎÊý¡£ + </para> + </note> + + <example> + <title><function>http_build_query</function> ʹÓÃʾÀý</title> + <programlisting role="php"> <![CDATA[ <?php $data = array('foo'=>'bar', @@ -36,18 +42,15 @@ 'cow'=>'milk', 'php'=>'hypertext processor'); -echo http_build_query($data); -/* Êä³ö£º - foo=bar&baz=boom&cow=milk&php=hypertext+processor - */ +echo http_build_query($data); // foo=bar&baz=boom&cow=milk&php=hypertext+processor ?> ]]> - </programlisting> - </example> + </programlisting> + </example> - <example> - <title><function>http_build_query</function> ʹÓÃÊý×ÖϱêµÄÔªËØ</title> - <programlisting role="php"> + <example> + <title><function>http_build_query</function> ʹÓÃÊý×ÖϱêµÄÔªËØ</title> + <programlisting role="php"> <![CDATA[ <?php $data = array('foo', 'bar', 'baz', 'boom', 'cow' => 'milk', 'php' =>'hypertext processor'); @@ -63,12 +66,12 @@ */ ?> ]]> - </programlisting> - </example> + </programlisting> + </example> - <example> - <title><function>http_build_query</function> ʹÓø´ÔÓµÄÊý×é</title> - <programlisting role="php"> + <example> + <title><function>http_build_query</function> ʹÓø´ÔÓµÄÊý×é</title> + <programlisting role="php"> <![CDATA[ <?php $data = array('user'=>array('name'=>'Bob Smith', @@ -83,30 +86,40 @@ 'CEO'); echo http_build_query($data, 'flags_'); -/* Êä³ö£º£¨ÎªÁ˿ɶÁÐÔ¶ÔÆä½øÐÐÁËÕÛÐУ© +?> +]]> + </programlisting> + <para> + ±¾Àý½«Êä³ö£¨Îª¿É¶ÁÐÔ½øÐÐÁËÕÛÐУ©£º + </para> + <screen> +<![CDATA[ user[name]=Bob+Smith&user[age]=47&user[sex]=M&user[dob]=5%1F12%1F1956& pastimes[0]=golf&pastimes[1]=opera&pastimes[2]=poker&pastimes[3]=rap& children[bobby][age]=12&children[bobby][sex]=M&children[sally][age]=8& children[sally][sex]=F&flags_0=CEO - - ×¢Ò⣺ֻÓлù´¡Êý×éÖеÄÊý×ÖϱêÔªËØ¡°CEO¡±²Å»ñÈ¡ÁËǰ׺£¬ÆäËüÊý×ÖϱêÔªËØ£¨Èç - pastimes ϵÄÔªËØ£©Ôò²»ÐèҪΪÁ˺Ϸ¨µÄ±äÁ¿Ãû¶ø¼ÓÉÏǰ׺¡£ - */ -?> ]]> - </programlisting> - </example> + + </screen> + <note> + <para> + Ö»Óлù´¡Êý×éÖеÄÊý×ÖϱêÔªËØ¡°CEO¡±²Å»ñÈ¡ÁËǰ׺£¬ÆäËüÊý×ÖϱêÔªËØ£¨Èç + pastimes ϵÄÔªËØ£©Ôò²»ÐèҪΪÁ˺Ϸ¨µÄ±äÁ¿Ãû¶ø¼ÓÉÏǰ׺¡£ + </para> + </note> + </example> - <example> - <title><function>http_build_query</function> ʹÓöÔÏó</title> - <programlisting role="php"> + <example> + <title><function>http_build_query</function> ʹÓöÔÏó</title> + <programlisting role="php"> <![CDATA[ <?php class myClass { var $foo; var $baz; - function myClass() { + function myClass() + { $this->foo = 'bar'; $this->baz = 'boom'; } @@ -114,21 +127,18 @@ $data = new myClass(); -echo http_build_query($data); -/* Êä³ö£º - foo=bar&baz=boom - */ +echo http_build_query($data); // foo=bar&baz=boom ?> ]]> - </programlisting> - </example> + </programlisting> + </example> - <simpara> - ²Î¼û£º<function>parse_str</function>¡¢<function>parse_url</function>¡¢<function>urlencode</function> - ºÍ <function>array_walk</function> - </simpara> - </refsect1> - </refentry> + <simpara> + ²Î¼û <function>parse_str</function>£¬<function>parse_url</function>£¬<function>urlencode</function> + ºÍ <function>array_walk</function>¡£ + </simpara> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: @@ -149,5 +159,4 @@ vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 ---> - +--> \ No newline at end of file http://cvs.php.net/viewcvs.cgi/phpdoc-zh/reference/url/functions/parse-url.xml?r1=1.2&r2=1.3&diff_format=u Index: phpdoc-zh/reference/url/functions/parse-url.xml diff -u phpdoc-zh/reference/url/functions/parse-url.xml:1.2 phpdoc-zh/reference/url/functions/parse-url.xml:1.3 --- phpdoc-zh/reference/url/functions/parse-url.xml:1.2 Thu Jul 14 17:28:27 2005 +++ phpdoc-zh/reference/url/functions/parse-url.xml Sun Feb 5 00:47:02 2006 @@ -1,78 +1,111 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.2 $ --> -<!-- $Author: yincheng $ --> -<!-- EN-Revision: 1.9 Maintainer: nio Status: ready --> -<!-- splitted from ./en/functions/url.xml, last change in rev 1.2 --> - <refentry id="function.parse-url"> - <refnamediv> - <refname>parse_url</refname> - <refpurpose>½âÎö URL£¬·µ»ØÆä×é³É²¿·Ö</refpurpose> - </refnamediv> - <refsect1> - <title>ÃèÊö</title> - <methodsynopsis> - <type>array</type><methodname>parse_url</methodname> - <methodparam><type>string</type><parameter>url</parameter></methodparam> - </methodsynopsis> - <para> - ´Ëº¯Êý·µ»ØÒ»¸ö¹ØÁªÊý×飬°üº¬ÏÖÓÐ URL µÄ¸÷ÖÖ×é³É²¿·Ö¡£Èç¹ûȱÉÙÁËÆäÖеÄijһ¸ö£¬Ôò²»»áΪÕâ¸ö×é³É²¿·Ö´´½¨Êý×éÏî¡£×é³É²¿·ÖΪ£º - <itemizedlist> - <listitem> - <simpara> - <structfield>scheme</structfield> - Èç http - </simpara> - </listitem> - <listitem> - <simpara> - <structfield>host</structfield> - </simpara> - </listitem> - <listitem> - <simpara> - <structfield>port</structfield> - </simpara> - </listitem> - <listitem> - <simpara> - <structfield>user</structfield> - </simpara> - </listitem> - <listitem> - <simpara> - <structfield>pass</structfield> - </simpara> - </listitem> - <listitem> - <simpara> - <structfield>path</structfield> - </simpara> - </listitem> - <listitem> - <simpara> - <structfield>query</structfield> - ÔÚÎʺŠ<literal>?</literal> Ö®ºó - </simpara> - </listitem> - <listitem> - <simpara> - <structfield>fragment</structfield> - ÔÚÉ¢ÁзûºÅ <literal>#</literal> Ö®ºó - </simpara> - </listitem> - </itemizedlist> - </para> - <para> - ´Ëº¯Êý²¢ <emphasis role="strong">²»</emphasis> Òâζןø¶¨µÄ - URL ÊǺϷ¨µÄ£¬ËüÖ»Êǽ«ÉÏ·½ÁбíÖеĸ÷²¿·Ö·Ö¿ª¡£<function>parse_url</function> - ¿É½ÓÊܲ»ÍêÕûµÄ URL£¬²¢¾¡Á¿½«Æä½âÎöÕýÈ·¡£ - </para> - <note> - <para> - ´Ëº¯Êý¶ÔÏà¶Ô·¾¶µÄ URL ²»Æð×÷Óᣠ- </para> - </note> - <example> - <title><function>parse_url</function> ʾÀý</title> - <screen> -$ php -r 'print_r(parse_url("http://username:password@hostname/path?arg=value#anchor"));' +<!-- $Revision: 1.3 $ --> +<!-- $Author: dallas $ --> +<!-- EN-Revision: 1.13 Maintainer: nio Status: ready --> +<!-- CREDITS: dallas --> +<refentry id="function.parse-url"> + <refnamediv> + <refname>parse_url</refname> + <refpurpose>½âÎö URL£¬·µ»ØÆä×é³É²¿·Ö</refpurpose> + </refnamediv> + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>array</type><methodname>parse_url</methodname> + <methodparam><type>string</type><parameter>url</parameter></methodparam> + </methodsynopsis> + <para> + ±¾º¯Êý½âÎöÒ»¸ö URL ²¢·µ»ØÒ»¸ö¹ØÁªÊý×飬°üº¬ÔÚ URL ÖгöÏֵĸ÷ÖÖ×é³É²¿·Ö¡£ + </para> + <para> + ±¾º¯Êý<emphasis role="strong">²»ÊÇ</emphasis>ÓÃÀ´ÑéÖ¤¸ø¶¨ URL + µÄºÏ·¨ÐԵģ¬Ö»Êǽ«Æä·Ö½âΪÏÂÃæÁгöµÄ²¿·Ö¡£²»ÍêÕûµÄ URL + Ò²±»½ÓÊÜ£¬<function>parse_url</function> »á³¢ÊÔ¾¡Á¿ÕýÈ·µØ½«Æä½âÎö¡£ + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>url</parameter></term> + <listitem> + <para> + Òª½âÎöµÄ URL + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + ¶ÔÑÏÖØ²»ºÏ¸ñµÄ URL£¬<function>parse_url</function> ¿ÉÄܻ᷵»Ø + &false; ²¢·¢³ö <constant>E_WARNING</constant>¡£·ñÔò»á·µ»ØÒ»¸ö¹ØÁªÊý×飬Æä×é³É²¿·ÖΪ£¨ÖÁÉÙÓÐÒ»¸ö£©£º + <itemizedlist> + <listitem> + <simpara> + <structfield>scheme</structfield> - Èç http + </simpara> + </listitem> + <listitem> + <simpara> + <structfield>host</structfield> + </simpara> + </listitem> + <listitem> + <simpara> + <structfield>port</structfield> + </simpara> + </listitem> + <listitem> + <simpara> + <structfield>user</structfield> + </simpara> + </listitem> + <listitem> + <simpara> + <structfield>pass</structfield> + </simpara> + </listitem> + <listitem> + <simpara> + <structfield>path</structfield> + </simpara> + </listitem> + <listitem> + <simpara> + <structfield>query</structfield> - ÔÚÎʺŠ<literal>?</literal> Ö®ºó + </simpara> + </listitem> + <listitem> + <simpara> + <structfield>fragment</structfield> - ÔÚÉ¢ÁзûºÅ <literal>#</literal> Ö®ºó + </simpara> + </listitem> + </itemizedlist> + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <example> + <title><function>parse_url</function> Àý×Ó</title> + <programlisting role="php"> +<![CDATA[ +<?php +$url = 'http://username:password@hostname/path?arg=value#anchor'; + +print_r(parse_url($url)); +?> +]]> + </programlisting> + &example.outputs; + <screen> +<![CDATA[ Array ( [scheme] => http @@ -83,22 +116,39 @@ [query] => arg=value [fragment] => anchor ) +]]> + </screen> + </example> + </para> + </refsect1> -$ php -r 'print_r(parse_url("http://invalid_host..name/"));' -Array -( - [scheme] => http - [host] => invalid_host..name - [path] => / -) - </screen> - </example> - <para> - ²Î¼û <function>pathinfo</function>¡¢<function>parse_str</function>¡¢<function>dirname</function> - Óë <function>basename</function>¡£ - </para> - </refsect1> - </refentry> + <refsect1 role="notes"> + &reftitle.notes; + <note> + <para> + ±¾º¯Êý²»ÄÜÓÃÓÚÏà¶Ô URL¡£ + </para> + </note> + <note> + <para> + <function>parse_url</function> ÊÇרÃÅÓÃÀ´½âÎö URL ¶ø²»ÊÇ URI µÄ¡£²»¹ýΪ×ñ´Ó PHP + Ïòºó¼æÈݵÄÐèÒªÓиöÀýÍ⣬¶Ô file:// ЭÒéÔÊÐíÈý¸öбÏߣ¨file:///...£©¡£ÆäËüÈκÎЭÒé¶¼²»ÄÜÕâÑù¡£ + </para> + </note> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>pathinfo</function></member> + <member><function>parse_str</function></member> + <member><function>dirname</function></member> + <member><function>basename</function></member> + </simplelist> + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewcvs.cgi/phpdoc-zh/reference/url/functions/rawurldecode.xml?r1=1.1&r2=1.2&diff_format=u Index: phpdoc-zh/reference/url/functions/rawurldecode.xml diff -u phpdoc-zh/reference/url/functions/rawurldecode.xml:1.1 phpdoc-zh/reference/url/functions/rawurldecode.xml:1.2 --- phpdoc-zh/reference/url/functions/rawurldecode.xml:1.1 Wed Nov 26 12:42:13 2003 +++ phpdoc-zh/reference/url/functions/rawurldecode.xml Sun Feb 5 00:47:02 2006 @@ -1,26 +1,25 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.1 $ --> -<!-- $Author: nio $ --> +<!-- $Revision: 1.2 $ --> +<!-- $Author: dallas $ --> <!-- EN-Revision: 1.4 Maintainer: nio Status: ready --> -<!-- splitted from ./en/functions/url.xml, last change in rev 1.6 --> - <refentry id="function.rawurldecode"> - <refnamediv> - <refname>rawurldecode</refname> - <refpurpose>¶ÔÒѱàÂëµÄ URL ×Ö·û´®½øÐнâÂë</refpurpose> - </refnamediv> - <refsect1> - <title>ÃèÊö</title> - <methodsynopsis> - <type>string</type><methodname>rawurldecode</methodname> - <methodparam><type>string</type><parameter>str</parameter></methodparam> - </methodsynopsis> - <para> - ·µ»Ø×Ö·û´®£¬´Ë×Ö·û´®Öаٷֺţ¨<literal>%</literal>£©ºó¸úÁ½Î»Ê®Áù½øÖÆÊýµÄÐòÁж¼½«±»Ìæ»»³ÉÔ­Òå×Ö·û¡£ - </para> - <para> - <example> - <title><function>rawurldecode</function> ʾÀý</title> - <programlisting role="php"> +<refentry id="function.rawurldecode"> + <refnamediv> + <refname>rawurldecode</refname> + <refpurpose>¶ÔÒѱàÂëµÄ URL ×Ö·û´®½øÐнâÂë</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>string</type><methodname>rawurldecode</methodname> + <methodparam><type>string</type><parameter>str</parameter></methodparam> + </methodsynopsis> + <para> + ·µ»Ø×Ö·û´®£¬´Ë×Ö·û´®Öаٷֺţ¨<literal>%</literal>£©ºó¸úÁ½Î»Ê®Áù½øÖÆÊýµÄÐòÁж¼½«±»Ìæ»»³ÉÔ­Òå×Ö·û¡£ + </para> + <para> + <example> + <title><function>rawurldecode</function> ʾÀý</title> + <programlisting role="php"> <![CDATA[ <?php @@ -28,21 +27,21 @@ ?> ]]> - </programlisting> - </example> - </para> - <note> - <para> - <function>rawurldecode</function> ²»»á°Ñ¼ÓºÅ£¨'+'£©½âÂëΪ¿Õ¸ñ£¬¶ø - <function>urldecode</function> ¿ÉÒÔ¡£ - </para> - </note> - <simpara> - ²Î¼û <function>rawurlencode</function>¡¢<function>urldecode</function> - Óë <function>urlencode</function>¡£ - </simpara> - </refsect1> - </refentry> + </programlisting> + </example> + </para> + <note> + <para> + <function>rawurldecode</function> ²»»á°Ñ¼ÓºÅ£¨'+'£©½âÂëΪ¿Õ¸ñ£¬¶ø + <function>urldecode</function> ¿ÉÒÔ¡£ + </para> + </note> + <simpara> + ²Î¼û <function>rawurlencode</function>£¬<function>urldecode</function> + ºÍ <function>urlencode</function>¡£ + </simpara> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewcvs.cgi/phpdoc-zh/reference/url/functions/rawurlencode.xml?r1=1.2&r2=1.3&diff_format=u Index: phpdoc-zh/reference/url/functions/rawurlencode.xml diff -u phpdoc-zh/reference/url/functions/rawurlencode.xml:1.2 phpdoc-zh/reference/url/functions/rawurlencode.xml:1.3 --- phpdoc-zh/reference/url/functions/rawurlencode.xml:1.2 Thu Jul 14 17:28:28 2005 +++ phpdoc-zh/reference/url/functions/rawurlencode.xml Sun Feb 5 00:47:02 2006 @@ -1,63 +1,62 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.2 $ --> -<!-- $Author: yincheng $ --> -<!-- EN-Revision: 1.7 Maintainer: nio Status: ready --> -<!-- splitted from ./en/functions/url.xml, last change in rev 1.6 --> - <refentry id="function.rawurlencode"> - <refnamediv> - <refname>rawurlencode</refname> - <refpurpose>°´ÕÕ RFC 1738 ¶Ô URL ½øÐбàÂë</refpurpose> - </refnamediv> - <refsect1> - <title>ÃèÊö</title> - <methodsynopsis> - <type>string</type><methodname>rawurlencode</methodname> - <methodparam><type>string</type><parameter>str</parameter></methodparam> - </methodsynopsis> - <para> - ·µ»Ø×Ö·û´®£¬´Ë×Ö·û´®ÖгýÁË - <literal>-_.</literal> - Ö®ÍâµÄËùÓзÇ×ÖĸÊý×Ö×Ö·û¶¼½«±»Ìæ»»³É°Ù·ÖºÅ£¨<literal>%</literal>£©ºó¸úÁ½Î»Ê®Áù½øÖÆÊý¡£ÕâÊÇÔÚ - RFC 1738 ÖÐÃèÊöµÄ±àÂ룬ÊÇΪÁ˱£»¤Ô­Òå×Ö·ûÒÔÃâÆä±»½âÊÍÎªÌØÊâµÄ - URL ¶¨½ç·û£¬Í¬Ê±±£»¤ URL - ¸ñʽÒÔÃâÆä±»´«ÊäýÌ壨ÏñһЩÓʼþϵͳ£©Ê¹ÓÃ×Ö·ûת»»Ê±ÅªÂÒ¡£ÀýÈ磬Èç¹ûÄãÏëÔÚ - FTP µÄ URL Öаüº¬ÃÜÂ룺 - </para> - <para> - <example> - <title><function>rawurlencode</function> ʾÀý 1</title> - <programlisting role="php"> +<!-- $Revision: 1.3 $ --> +<!-- $Author: dallas $ --> +<!-- EN-Revision: 1.8 Maintainer: nio Status: ready --> +<refentry id="function.rawurlencode"> + <refnamediv> + <refname>rawurlencode</refname> + <refpurpose>°´ÕÕ RFC 1738 ¶Ô URL ½øÐбàÂë</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>string</type><methodname>rawurlencode</methodname> + <methodparam><type>string</type><parameter>str</parameter></methodparam> + </methodsynopsis> + <para> + ·µ»Ø×Ö·û´®£¬´Ë×Ö·û´®ÖгýÁË + <literal>-_.</literal> + Ö®ÍâµÄËùÓзÇ×ÖĸÊý×Ö×Ö·û¶¼½«±»Ìæ»»³É°Ù·ÖºÅ£¨<literal>%</literal>£©ºó¸úÁ½Î»Ê®Áù½øÖÆÊý¡£ÕâÊÇÔÚ + RFC 1738 ÖÐÃèÊöµÄ±àÂ룬ÊÇΪÁ˱£»¤Ô­Òå×Ö·ûÒÔÃâÆä±»½âÊÍÎªÌØÊâµÄ + URL ¶¨½ç·û£¬Í¬Ê±±£»¤ URL + ¸ñʽÒÔÃâÆä±»´«ÊäýÌ壨ÏñһЩÓʼþϵͳ£©Ê¹ÓÃ×Ö·ûת»»Ê±ÅªÂÒ¡£ÀýÈ磬Èç¹ûÄãÏëÔÚ + FTP µÄ URL Öаüº¬ÃÜÂ룺 + </para> + <para> + <example> + <title><function>rawurlencode</function> ʾÀý 1</title> + <programlisting role="php"> <![CDATA[ <?php echo '<a href="ftp://user:', rawurlencode('foo @+%/'), '@ftp.example.com/x.txt">'; ?> ]]> - </programlisting> - </example> - </para> - <para> - »òÕߣ¬Èç¹ûÄãÏëͨ¹ý URL µÄ PATH_INFO ¹¹³É²¿·ÖÈ¥´«µÝÐÅÏ¢£º - </para> - <para> - <example> - <title><function>rawurlencode</function> ʾÀý 2</title> - <programlisting role="php"> + </programlisting> + </example> + </para> + <para> + »òÕߣ¬Èç¹ûÄãÏëͨ¹ý URL µÄ PATH_INFO ¹¹³É²¿·ÖÈ¥´«µÝÐÅÏ¢£º + </para> + <para> + <example> + <title><function>rawurlencode</function> ʾÀý 2</title> + <programlisting role="php"> <![CDATA[ <?php echo '<a href="http://example.com/department_list_script/', rawurlencode('sales and marketing/Miami'), '">'; ?> ]]> - </programlisting> - </example> - </para> - <simpara> - ²Î¼û <function>rawurldecode</function>¡¢<function>urldecode</function>¡¢<function>urlencode</function> - Óë <ulink url="&url.rfc;1738">RFC 1738</ulink>¡£ - </simpara> - </refsect1> - </refentry> + </programlisting> + </example> + </para> + <simpara> + ²Î¼û <function>rawurldecode</function>¡¢<function>urldecode</function>¡¢<function>urlencode</function> + Óë <ulink url="&url.rfc;1738">RFC 1738</ulink>¡£ + </simpara> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewcvs.cgi/phpdoc-zh/reference/url/functions/urldecode.xml?r1=1.1&r2=1.2&diff_format=u Index: phpdoc-zh/reference/url/functions/urldecode.xml diff -u phpdoc-zh/reference/url/functions/urldecode.xml:1.1 phpdoc-zh/reference/url/functions/urldecode.xml:1.2 --- phpdoc-zh/reference/url/functions/urldecode.xml:1.1 Thu Dec 11 12:53:37 2003 +++ phpdoc-zh/reference/url/functions/urldecode.xml Sun Feb 5 00:47:02 2006 @@ -1,25 +1,24 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.1 $ --> -<!-- $Author: nio $ --> +<!-- $Revision: 1.2 $ --> +<!-- $Author: dallas $ --> <!-- EN-Revision: 1.3 Maintainer: nio Status: ready --> -<!-- splitted from ./en/functions/url.xml, last change in rev 1.2 --> - <refentry id="function.urldecode"> - <refnamediv> - <refname>urldecode</refname> - <refpurpose>½âÂëÒѱàÂëµÄ URL ×Ö·û´®</refpurpose> - </refnamediv> - <refsect1> - <title>ÃèÊö</title> - <methodsynopsis> - <type>string</type><methodname>urldecode</methodname> - <methodparam><type>string</type><parameter>str</parameter></methodparam> - </methodsynopsis> - <para> - ½âÂë¸ø³öµÄÒѱàÂë×Ö·û´®ÖеÄÈκΠ- <literal>%<replaceable>##</replaceable></literal>¡£·µ»Ø½âÂëºóµÄ×Ö·û´®¡£ - <example> - <title><function>urldecode</function> example</title> - <programlisting role="php"> +<refentry id="function.urldecode"> + <refnamediv> + <refname>urldecode</refname> + <refpurpose>½âÂëÒѱàÂëµÄ URL ×Ö·û´®</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>string</type><methodname>urldecode</methodname> + <methodparam><type>string</type><parameter>str</parameter></methodparam> + </methodsynopsis> + <para> + ½âÂë¸ø³öµÄÒѱàÂë×Ö·û´®ÖеÄÈκΠ+ <literal>%<replaceable>##</replaceable></literal>¡£·µ»Ø½âÂëºóµÄ×Ö·û´®¡£ + <example> + <title><function>urldecode</function> Àý×Ó</title> + <programlisting role="php"> <![CDATA[ <?php $a = explode('&', $QUERY_STRING); @@ -32,15 +31,15 @@ } ?> ]]> - </programlisting> - </example> - </para> - <para> - ²Î¼û <function>urlencode</function>¡¢<function>rawurlencode</function> - Óë <function>rawurldecode</function>¡£ - </para> - </refsect1> - </refentry> + </programlisting> + </example> + </para> + <para> + ²Î¼û <function>urlencode</function>£¬<function>rawurlencode</function> + ºÍ <function>rawurldecode</function>¡£ + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewcvs.cgi/phpdoc-zh/reference/url/functions/urlencode.xml?r1=1.1&r2=1.2&diff_format=u Index: phpdoc-zh/reference/url/functions/urlencode.xml diff -u phpdoc-zh/reference/url/functions/urlencode.xml:1.1 phpdoc-zh/reference/url/functions/urlencode.xml:1.2 --- phpdoc-zh/reference/url/functions/urlencode.xml:1.1 Thu Dec 11 12:53:37 2003 +++ phpdoc-zh/reference/url/functions/urlencode.xml Sun Feb 5 00:47:02 2006 @@ -1,68 +1,68 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.1 $ --> -<!-- $Author: nio $ --> -<!-- EN-Revision: 1.6 Maintainer: nio Status: ready --> -<!-- splitted from ./en/functions/url.xml, last change in rev 1.2 --> - <refentry id="function.urlencode"> - <refnamediv> - <refname>urlencode</refname> - <refpurpose>±àÂë URL ×Ö·û´®</refpurpose> - </refnamediv> - <refsect1> - <title>ÃèÊö</title> - <methodsynopsis> - <type>string</type><methodname>urlencode</methodname> - <methodparam><type>string</type><parameter>str</parameter></methodparam> - </methodsynopsis> - <para> - ·µ»Ø×Ö·û´®£¬´Ë×Ö·û´®ÖгýÁË - <literal>-_.</literal> - Ö®ÍâµÄËùÓзÇ×ÖĸÊý×Ö×Ö·û¶¼½«±»Ìæ»»³É°Ù·ÖºÅ£¨<literal>%</literal>£©ºó¸úÁ½Î»Ê®Áù½øÖÆÊý£¬¿Õ¸ñÔò±àÂëΪ¼ÓºÅ£¨<literal>+</literal>£©¡£´Ë±àÂëÓë WWW - ±íµ¥ POST Êý¾ÝµÄ±àÂ뷽ʽÊÇÒ»ÑùµÄ£¬Í¬Ê±Óë - <literal>application/x-www-form-urlencoded</literal> - µÄýÌåÀàÐͱàÂ뷽ʽһÑù¡£ÓÉÓÚÀúÊ·Ô­Òò£¬´Ë±àÂëÔÚ½«¿Õ¸ñ±àÂëΪ¼ÓºÅ£¨+£©·½ÃæÓë - RFC1738 ±àÂ루²Î¼û - <function>rawurlencode</function>£©²»Í¬¡£´Ëº¯Êý±ãÓÚ½«×Ö·û´®±àÂë²¢½«ÆäÓÃÓÚ URL µÄÇëÇ󲿷֣¬Í¬Ê±Ëü»¹±ãÓÚ½«±äÁ¿´«µÝ¸øÏÂÒ»Ò³£º - <example> - <title><function>urlencode</function> ʾÀý</title> - <programlisting role="php"> +<!-- $Revision: 1.2 $ --> +<!-- $Author: dallas $ --> +<!-- EN-Revision: 1.8 Maintainer: nio Status: ready --> +<refentry id="function.urlencode"> + <refnamediv> + <refname>urlencode</refname> + <refpurpose>±àÂë URL ×Ö·û´®</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>string</type><methodname>urlencode</methodname> + <methodparam><type>string</type><parameter>str</parameter></methodparam> + </methodsynopsis> + <para> + ·µ»Ø×Ö·û´®£¬´Ë×Ö·û´®ÖгýÁË + <literal>-_.</literal> + Ö®ÍâµÄËùÓзÇ×ÖĸÊý×Ö×Ö·û¶¼½«±»Ìæ»»³É°Ù·ÖºÅ£¨<literal>%</literal>£©ºó¸úÁ½Î»Ê®Áù½øÖÆÊý£¬¿Õ¸ñÔò±àÂëΪ¼ÓºÅ£¨<literal>+</literal>£©¡£´Ë±àÂëÓë WWW + ±íµ¥ POST Êý¾ÝµÄ±àÂ뷽ʽÊÇÒ»ÑùµÄ£¬Í¬Ê±Óë + <literal>application/x-www-form-urlencoded</literal> + µÄýÌåÀàÐͱàÂ뷽ʽһÑù¡£ÓÉÓÚÀúÊ·Ô­Òò£¬´Ë±àÂëÔÚ½«¿Õ¸ñ±àÂëΪ¼ÓºÅ£¨+£©·½ÃæÓë + RFC1738 ±àÂ루²Î¼û + <function>rawurlencode</function>£©²»Í¬¡£´Ëº¯Êý±ãÓÚ½«×Ö·û´®±àÂë²¢½«ÆäÓÃÓÚ URL µÄÇëÇ󲿷֣¬Í¬Ê±Ëü»¹±ãÓÚ½«±äÁ¿´«µÝ¸øÏÂÒ»Ò³£º + <example> + <title><function>urlencode</function> Àý×Ó</title> + <programlisting role="php"> <![CDATA[ <?php echo '<a href="mycgi?foo=', urlencode($userinput), '">'; ?> ]]> - </programlisting> - </example> - </para> - <para> - ×¢Ò⣺СÐÄÓë HTML ʵÌåÏàÆ¥ÅäµÄ±äÁ¿¡£Ïñ - &amp;amp¡¢&amp;copy ºÍ &amp;pound - ¶¼½«±»ä¯ÀÀÆ÷½âÎö£¬²¢Ê¹ÓÃʵ¼ÊʵÌåÌæ´úËùÆÚ´ýµÄ±äÁ¿Ãû¡£ÕâÊÇÃ÷ÏԵĻìÂÒ£¬W3C - ÒѾ­¸æ½ëÈËÃǺü¸ÄêÁË¡£²Î¿¼µØÖ·£º<ulink url="&url.argsep;">&url.argsep;</ulink> - PHP ͨ¹ý arg_separator .ini Ö¸Á֧³Ö½«²ÎÊý·Ö¸î·û±ä³É W3C - Ëù½¨ÒéµÄ·ÖºÅ¡£²»ÐÒµÄÊÇ´ó¶àÊýÓû§´úÀí²¢²»·¢Ëͷֺŷָô·û¸ñʽµÄ±íµ¥Êý¾Ý¡£½ÏΪ¼òµ¥µÄ½â¾ö°ì·¨ÊÇʹÓà - &amp;amp; ´úÌæ &amp; ×÷Ϊ·Ö¸ô·û¡£Äã²»ÐèҪΪ´ËÐÞ¸Ä PHP - µÄ arg_separator¡£ÈÃËüÈÔΪ &amp;£¬¶ø½öʹÓà - htmlentities(urlencode($data)) ¶ÔÄãµÄ URL ½øÐбàÂë¡£ - </para> - <para> - <example> - <title><function>urlencode</function> Óë <function>htmlentities</function> ʾÀý</title> - <programlisting role="php"> + </programlisting> + </example> + </para> + <para> + ×¢Ò⣺СÐÄÓë HTML ʵÌåÏàÆ¥ÅäµÄ±äÁ¿¡£Ïñ + &amp;amp¡¢&amp;copy ºÍ &amp;pound + ¶¼½«±»ä¯ÀÀÆ÷½âÎö£¬²¢Ê¹ÓÃʵ¼ÊʵÌåÌæ´úËùÆÚ´ýµÄ±äÁ¿Ãû¡£ÕâÊÇÃ÷ÏԵĻìÂÒ£¬W3C + ÒѾ­¸æ½ëÈËÃǺü¸ÄêÁË¡£²Î¿¼µØÖ·£º<ulink url="&url.argsep;">&url.argsep;</ulink>¡£PHP + ͨ¹ý arg_separator.ini Ö¸Á֧³Ö½«²ÎÊý·Ö¸î·û±ä³É W3C + Ëù½¨ÒéµÄ·ÖºÅ¡£²»ÐÒµÄÊÇ´ó¶àÊýÓû§´úÀí²¢²»·¢Ëͷֺŷָô·û¸ñʽµÄ±íµ¥Êý¾Ý¡£½ÏΪ¼òµ¥µÄ½â¾ö°ì·¨ÊÇʹÓà + &amp;amp; ´úÌæ &amp; ×÷Ϊ·Ö¸ô·û¡£Äã²»ÐèҪΪ´ËÐÞ¸Ä PHP + µÄ arg_separator¡£ÈÃËüÈÔΪ &amp;£¬¶ø½öʹÓà <function>htmlentities</function> + »ò <function>htmlspecialchars</function> ¶ÔÄãµÄ URL ½øÐбàÂë¡£ + </para> + <para> + <example> + <title><function>urlencode</function> Óë <function>htmlentities</function> Àý×Ó</title> + <programlisting role="php"> <![CDATA[ <?php -echo '<a href="mycgi?foo=', htmlentities(urlencode($userinput)), '">'; +$query_string = 'foo=' . urlencode($foo) . '&bar=' . urlencode($bar); +echo '<a href="mycgi?' . htmlentities($query_string) . '">'; ?> ]]> - </programlisting> - </example> - </para> - <para> - ²Î¼û <function>urldecode</function>¡¢<function>htmlentities</function>¡¢<function>rawurldecode</function> - Óë <function>rawurlencode</function>¡£ - </para> - </refsect1> - </refentry> + </programlisting> + </example> + </para> + <para> + ²Î¼û <function>urldecode</function>£¬<function>htmlentities</function>£¬<function>rawurldecode</function> + ºÍ <function>rawurlencode</function>¡£ + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewcvs.cgi/phpdoc-zh/reference/url/functions/get-headers.xml?view=markup&rev=1.1 Index: phpdoc-zh/reference/url/functions/get-headers.xml +++ phpdoc-zh/reference/url/functions/get-headers.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.6 Maintainer: dallas Status: ready --> <refentry id="function.get-headers"> <refnamediv> <refname>get_headers</refname> <refpurpose>È¡µÃ·þÎñÆ÷ÏìÓ¦Ò»¸ö HTTP ÇëÇóËù·¢Ë͵ÄËùÓбêÍ·</refpurpose> </refnamediv> <refsect1> <title>˵Ã÷</title> <methodsynopsis> <type>array</type><methodname>get_headers</methodname> <methodparam><type>string</type><parameter>url</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>format</parameter></methodparam> </methodsynopsis> <para> <function>get_headers</function> ·µ»ØÒ»¸öÊý×飬°üº¬ÓзþÎñÆ÷ÏìÓ¦Ò»¸ö HTTP ÇëÇóËù·¢Ë͵ıêÍ·¡£Èç¹ûʧ°ÜÔò·µ»Ø &false; ²¢·¢³öÒ»Ìõ <constant>E_WARNING</constant> ¼¶±ðµÄ´íÎóÐÅÏ¢¡£ </para> <para> Èç¹û½«¿ÉÑ¡µÄ <parameter>format</parameter> ²ÎÊýÉèΪ 1£¬Ôò <function>get_headers</function> »á½âÎöÏìÓ¦µÄÐÅÏ¢²¢É趨Êý×éµÄ¼üÃû¡£ </para> <para> <example> <title><function>get_headers</function> Àý×Ó</title> <programlisting role="php"> <![CDATA[ <?php $url = 'http://www.example.com'; print_r(get_headers($url)); print_r(get_headers($url, 1)); ?> ]]> </programlisting> &example.outputs.similar; <screen> <![CDATA[ Array ( [0] => HTTP/1.1 200 OK [1] => Date: Sat, 29 May 2004 12:28:13 GMT [2] => Server: Apache/1.3.27 (Unix) (Red-Hat/Linux) [3] => Last-Modified: Wed, 08 Jan 2003 23:11:55 GMT [4] => ETag: "3f80f-1b6-3e1cb03b" [5] => Accept-Ranges: bytes [6] => Content-Length: 438 [7] => Connection: close [8] => Content-Type: text/html ) Array ( [0] => HTTP/1.1 200 OK [Date] => Sat, 29 May 2004 12:28:14 GMT [Server] => Apache/1.3.27 (Unix) (Red-Hat/Linux) [Last-Modified] => Wed, 08 Jan 2003 23:11:55 GMT [ETag] => "3f80f-1b6-3e1cb03b" [Accept-Ranges] => bytes [Content-Length] => 438 [Connection] => close [Content-Type] => text/html ) ]]> </screen> </example> </para> </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 -->
« previous php.doc.zh (#2774) next »