cvs: phpdoc-el /reference/url/functions base64-decode.xml base64-encode.xml get-meta-tags.xml parse-url.xml rawurldecode.xml rawurlencode.xml urldecode.xml urlencode.xml
[email protected] ("Dimitris Glezos") Sun, 20 Jul 2003 10:46:46 -0000
| Newsgroups | php.doc.el |
|---|---|
| Message-ID | <cvssubbie1058698006@cvsserver> |
subbie Sun Jul 20 06:46:46 2003 EDT
Added files:
/phpdoc-el/reference/url/functions base64-decode.xml
base64-encode.xml
get-meta-tags.xml parse-url.xml
rawurldecode.xml
rawurlencode.xml urldecode.xml
urlencode.xml
Log:
added files
subbie-20030720064646.txt
(text/plain, 25.1 KB)
Index: phpdoc-el/reference/url/functions/base64-decode.xml
+++ phpdoc-el/reference/url/functions/base64-decode.xml
<?xml version="1.0" encoding="iso-8859-7"?>
<!-- $Revision: 1.1 $ -->
<!-- En-Revision: 1.4 Maintainer: legionnaire 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> êáé åðéóôñÝöåé ôá áñ÷éêÜ
äåäïìÝíá. Ôá åðéóôñåöüìåíá äåäïìÝíá åíäå÷ïìÝíùò íá åßíáé äõáäéêÜ.
</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:
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
-->
Index: phpdoc-el/reference/url/functions/base64-encode.xml
+++ phpdoc-el/reference/url/functions/base64-encode.xml
<?xml version="1.0" encoding="iso-8859-7"?>
<!-- $Revision: 1.1 $ -->
<!-- En-Revision: 1.4 Maintainer: Legionnaire 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>äåäïìÝíá</parameter></methodparam>
</methodsynopsis>
<para>
<function>base64_encode</function> åðéóôñÝöåé
<parameter>äåäïìÝíá</parameter> êùäéêïðïéçìÝíá ìå base64. ÁõôÞ ç êùäéêïðïßçóç
åßíáé ó÷åäéáóìÝíç íá êÜíåé äõáäéêÜ äåäïìÝíá íá åðéâéþíïõí ôçí ìåôáöïñÜ äéáìÝóïõ
layers ìåôáöïñÜò ðïõ äåí åßíáé êáèáñÜ 8-bit, üðùò ìéêñÜ bodies áðü e-mail.
</para>
<para>
Ôá Base64-êùäéêïðïéÞìåíá äåäïìÝíá êáôáëáìâÜíïõí ðåñßðïõ 33% ðåñéóóüôåñï ÷þñï óå ó÷Ýóç ìå ôá áñ÷éêÜ
äåäïìÝíá.</para>
<para>
Äåßôå åðßóçò:
<function>base64_decode</function>,
<function>chunk_split</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:
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
-->
Index: phpdoc-el/reference/url/functions/get-meta-tags.xml
+++ phpdoc-el/reference/url/functions/get-meta-tags.xml
<<<<<<< get-meta-tags.xml
<?xml version="1.0" encoding="iso-8859-7"?>
<!-- $Revision: 1.1 $ -->
<!-- En-Revision: 1.3 Maintainer: legionnaire Status: Ready -->
=======
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
>>>>>>> 1.4
<!-- 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 tag áðü Ýíá áñ÷åßï êáé åðéóôñÝöåé
Ýíá ðßíáêá
</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> êáé ôï áíáëýåé ãñáììÞ-ãñáììÞ
ãéá <meta> tags óôï áñ÷åßï. Áõôü ìðïñåß íá åßíáé Ýíá ôïðéêü áñ÷åßï Þ
Ýíá <acronym>URL</acronym>. Ç áíÜëõóç óôáìáôÜ óôï
<literal></head></literal>.
</para>
<para>
Ïñßæïíôáò ôçí <parameter>use_include_path</parameter> óå 1 èá Ý÷åé ùò áðïôÝëåóìá
ôï PHP íá ðñïóðáèåß íá áíïßîåé ôï áñ÷åßï êáôÜ ìÞêïò ôïõ äåäïìÝíïõ include path
óýìöùíá ìå ôçí <link linkend="ini.include-path">include_path</link>
ïäçãßá. Áõôü ÷ñçóéìïðïéåßôáé ãéá ôïðéêÜ áñ÷åßá, ü÷é ãéá URLs.
</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">
<meta name="DESCRIPTION" content="a php manual">
<meta name="geo.position" content="49.33;-86.59">
</head> <!-- parsing stops here -->
]]>
</programlisting>
</example>
(äþóôå ðñïóï÷Þ óôá endings ôçò êÜèå ãñáììÞò - PHP ÷ñçóéìïðïéåß ìéá Ýìöõôç óõíÜñôçóç ãéá íá
áíáëýóåé ôï input, þóôå Ýíá áñ÷åßï Mac íá ìçí äïõëåýåé óôï Unix).
</para>
<para>
Ç ôéìÞ ôçò éäéüôçôáò name ãßíåôáé ôï êëåéäß, ç ôéìÞ ôçò éäéüôçôáò ôïõ
ðåñéå÷ïìÝíïõ ãßíåôáé ç ôéìÞ ôïõ åðéóôñåöüìåíïõ ðßíáêá, þóôå íá ìðïñåßôå
íá ÷ñçóéìïðïéåßôå åýêïëá ôõðéêÝò ëåéôïõñãßåò ôïõ ðßíáêá ãéá íá ôïí äéáôñÝîåôå Þ íá áðïêôÞóåôå ðñüóâáóç
óå ìåìïíïìÝíåò ôéìÝò. Åéäéêïß ÷áñáêôÞñåò óôçí ôéìÞ ìéáò éäéüôçôáò name
áíôéêáèßóôùíôáé ìå '_', ôï õðüëïéðï ìåôáôñÝðåôáé óå lower
case. Áí äõï meta tags Ý÷ïõí ôï ßäéï name, ìüíï ç ôåëåõôáßá
åðéóôñÝöåôáé.
</para>
<para>
<example>
<title>ÁõôÜ ðïõ åðéóôñÝöåé ç <function>get_meta_tags</function></title>
<programlisting role="php">
<![CDATA[
<?php
// Assuming the above tags are at www.example.com
$tags = get_meta_tags('http://www.example.com/');
// Notice how the keys are all lowercase now, and
// how . was replaced by _ in the key.
print $tags['author']; // name
print $tags['keywords']; // php documentation
print $tags['description']; // a php manual
print $tags['geo_position']; // 49.33;-86.59
?>
]]>
</programlisting>
</example>
</para>
<note>
<para>
<<<<<<< get-meta-tags.xml
Áðü ôçí PHP 4.0.5, <function>get_meta_tags</function> õðïóôçñßæïõí
åêôüò åéóáãùãéêþí html éäéüôçôåò.
=======
As of PHP 4.0.5, <function>get_meta_tags</function> supports
unquoted HTML attributes.
>>>>>>> 1.4
</para>
</note>
<para>
Äåßôå åðßóçò: <function>htmlentities</function> êáé
<function>urlencode</function>.
</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
-->
Index: phpdoc-el/reference/url/functions/parse-url.xml
+++ phpdoc-el/reference/url/functions/parse-url.xml
<<<<<<< parse-url.xml
<?xml version="1.0" encoding="iso-8859-7"?>
<!-- $Revision: 1.1 $ -->
<!-- En-Revision: 1.5 Maintainer: legionnaire Status: ready -->
=======
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
>>>>>>> 1.6
<!-- 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 ðïõ õðÜñ÷ïõí. Áõôü ðåñéëáìâÜíåé ôá
<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> - Ýðåéôá áðü ôï hachmark <literal>#</literal>
</simpara>
</listitem>
</itemizedlist>
</para>
<para>
ÁõôÞ ç óõíÜñôçóç <emphasis role="strong">äåí</emphasis> ðñïïñßæåôáé íá åðéêõñþóåé
ôï äùóìÝíï URL, ìüíï ôï óðÜåé óôá ðáñáðÜíù ìÝñç. ÁôåëÞ
urls ãßíïíôáé åðßóçò äåêôÜ, <function>parse_url</function> ðñïóðáèåß üóï ìðïñåß íá
ôá áíáëýóåé óùóôÜ.
</para>
<example>
<<<<<<< parse-url.xml
<title>×ñçóéìïðïéþíôáò <function>parse_url</function></title>
=======
<title><function>parse_url</function> example</title>
>>>>>>> 1.6
<screen>
$ php -r 'print_r( parse_url("http://username:password@hostname/path?arg=value#anchor"));'
Array
(
[scheme] => http
[host] => hostname
[user] => username
[pass] => password
[path] => /path
[query] => arg=value
[fragment] => anchor
)
$ 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>
<!-- 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
-->
Index: phpdoc-el/reference/url/functions/rawurldecode.xml
+++ phpdoc-el/reference/url/functions/rawurldecode.xml
<<<<<<< rawurldecode.xml
<?xml version="1.0" encoding="iso-8859-7"?>
<!-- $Revision: 1.1 $ -->
<!-- En-Revision: 1.2 Maintainer: legionnaire Status: Ready -->
=======
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
>>>>>>> 1.3
<!-- splitted from ./en/functions/url.xml, last change in rev 1.6 -->
<refentry id="function.rawurldecode">
<refnamediv>
<refname>rawurldecode</refname>
<refpurpose>Áðïêùäéêïðïåß URL-êùäéêïðïéçìÝíá strings</refpurpose>
</refnamediv>
<refsect1>
<title>ÐåñéãñáöÞ</title>
<methodsynopsis>
<type>string</type><methodname>rawurldecode</methodname>
<methodparam><type>string</type><parameter>str</parameter></methodparam>
</methodsynopsis>
<para>
<<<<<<< rawurldecode.xml
ÅðéóôñÝöåé Ýíá string óôï ïðïßï ïé áêïëïõèßåò ìå ôï óýìâïëï
(<literal>%</literal>) åðß ôïéò åêáôü áêïëïõèïýìåíåò áðü äõï øçößá hex Ý÷ïõí
áíôéêáôáóôáèåß ìå áëöáâçôéêïýò ÷áñáêôÞñåò. Ãéá ðáñÜäåéãìá, ôï string
<screen>foo%20bar%40baz</screen> áðïêùäéêïðïåßôáé óå <screen>foo bar@baz</screen>.
=======
Returns a string in which the sequences with percent
(<literal>%</literal>) signs followed by two hex digits have been
replaced with literal characters. For example, the string
<literal>foo%20bar%40baz</literal> decodes into <literal>foo
bar@baz</literal>.
>>>>>>> 1.3
</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:
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
-->
Index: phpdoc-el/reference/url/functions/rawurlencode.xml
+++ phpdoc-el/reference/url/functions/rawurlencode.xml
<<<<<<< rawurlencode.xml
<?xml version="1.0" encoding="iso-8859-7"?>
<!-- $Revision: 1.1 $ -->
<!-- En-Revision: 1.4 Maintainer: legionnaire Status: ready -->
=======
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
>>>>>>> 1.6
<!-- splitted from ./en/functions/url.xml, last change in rev 1.6 -->
<refentry id="function.rawurlencode">
<refnamediv>
<refname>rawurlencode</refname>
<refpurpose>URL-êùäéêïðïéÞóç óýìöùíá ìå RFC 1738</refpurpose>
</refnamediv>
<refsect1>
<title>ÐåñéãñáöÞ</title>
<methodsynopsis>
<type>string</type><methodname>rawurlencode</methodname>
<methodparam><type>string</type><parameter>str</parameter></methodparam>
</methodsynopsis>
<para>
<<<<<<< rawurlencode.xml
ÅðéóôñÝöåé Ýíá string óôï ïðïßï üëïé ïé ìç-áëöáñéèìçôéêïß ÷áñáêôÞñåò åêôüò ôïõ
<screen>-_.</screen> Ý÷ïõí áíôéêáôáóôáèåß ìå Ýíá óýìâïëï
(<literal>%</literal>) åðß ôïéò åêáôü áêïëïõèïýìåíï áðü äõï øçößá hex. ÁõôÞ åßíáé
ç êùäéêïðïßçóç ðïõ ðåñéãñÜöåôáé óôï RFC 1738 ãéá ôçí ðñïóôáóßá áëöáâçôéêþí
÷áñáêôÞñùí áðü ôï íá åñìçíåõôïýí ùò åéäêïß URL delimiters, êáé
ãéá ôçí ðñïóôáóßá ôùí URL áðü ôï íá êáôáêñåïõñãçèïýí áðü ìÝóá åêðïìðÞò (transmission media)
ìå ìåôáôñïðÝò ÷áñáêôÞñùí (üðùò ìåñéêÜ óõóôÞìáôá e-mail). Ãéá
ðáñÜäåéãìá, åÜí èÝëåéò íá óõìðåñéëÜâåéò Ýíá password óå Ýíá FTP URL:
=======
Returns a string in which all non-alphanumeric characters except
<literal>-_.</literal> have been replaced with a percent
(<literal>%</literal>) sign followed by two hex digits. This is
the encoding described in RFC 1738 for protecting literal
characters from being interpreted as special URL delimiters, and
for protecting URL's from being mangled by transmission media
with character conversions (like some email systems). For
example, if you want to include a password in an FTP URL:
>>>>>>> 1.6
</para>
<<<<<<< rawurlencode.xml
<example>
<title><function>rawurlencode</function> ðáñÜäåéãìá 1</title>
<programlisting role="php">
=======
<para>
<example>
<title><function>rawurlencode</function> example 1</title>
<programlisting role="php">
>>>>>>> 1.6
<![CDATA[
<?php
echo '<a href="ftp://user:', rawurlencode('foo @+%/'),
'@ftp.my.com/x.txt">';
?>
]]>
</programlisting>
</example>
</para>
<para>
¹, áí ìåôáöÝñåôå ðëçñïöïñßåò óå Ýíá PATH_INFO ôìÞìá ôïõ URL:
</para>
<<<<<<< rawurlencode.xml
<example>
<title><function>rawurlencode</function> ðáñÜäåéãìá 2</title>
<programlisting role="php">
=======
<para>
<example>
<title><function>rawurlencode</function> example 2</title>
<programlisting role="php">
>>>>>>> 1.6
<![CDATA[
<?php
echo '<a href="http://x.com/department_list_script/',
rawurlencode('sales and marketing/Miami'), '">';
?>
]]>
</programlisting>
</example>
</para>
<simpara>
Äåßôå åðßóçò: <function>rawurldecode</function>,
<function>urldecode</function>,
<<<<<<< rawurlencode.xml
<function>urlencode</function> êáé
<ulink url="&url.rfc;1738">RFC 1738</ulink>
=======
<function>urlencode</function> and
<ulink url="&url.rfc;1738">RFC 1738</ulink>.
>>>>>>> 1.6
</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
-->
Index: phpdoc-el/reference/url/functions/urldecode.xml
+++ phpdoc-el/reference/url/functions/urldecode.xml
<<<<<<< urldecode.xml
<?xml version="1.0" encoding="iso-8859-7"?>
<!-- $Revision: 1.1 $ -->
<!-- En-Revision: 1.2 Maintainer: legionnaire Status: Ready -->
=======
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
>>>>>>> 1.3
<!-- splitted from ./en/functions/url.xml, last change in rev 1.2 -->
<refentry id="function.urldecode">
<refnamediv>
<refname>urldecode</refname>
<refpurpose>Áðïêùäéêïðïéåß Ýíá URL-êùäéêïðïéçìÝíï string</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>
åíþ êùäéêïðïéåß óôï string ðïõ Ý÷åé äïèåß. Ôï áðïêùäéêïðïéçìÝíï string åðéóôñÝöåôáé.
<example>
<title><function>urldecode</function> ðáñÜäåéãìá</title>
<programlisting role="php">
<![CDATA[
<?php
$a = explode('&', $QUERY_STRING);
$i = 0;
while ($i < count($a)) {
$b = split('=', $a[$i]);
echo 'Value for parameter ', htmlspecialchars(urldecode($b[0])),
' is ', htmlspecialchars(urldecode($b[1])), "<br />\n";
$i++;
}
?>
]]>
</programlisting>
</example>
</para>
<para>
<<<<<<< urldecode.xml
Äåßôå åðßóçò: <function>urlencode</function>,
<function>rawurlencode</function>,
=======
See also <function>urlencode</function>,
<function>rawurlencode</function> and
>>>>>>> 1.3
<function>rawurldecode</function>.
</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
-->
Index: phpdoc-el/reference/url/functions/urlencode.xml
+++ phpdoc-el/reference/url/functions/urlencode.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- splitted from ./en/functions/url.xml, last change in rev 1.2 -->
<refentry id="function.urlencode">
<refnamediv>
<refname>urlencode</refname>
<refpurpose>URL-encodes string</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>urlencode</methodname>
<methodparam><type>string</type><parameter>str</parameter></methodparam>
</methodsynopsis>
<para>
Returns a string in which all non-alphanumeric characters except
<literal>-_.</literal> have been replaced with a percent
(<literal>%</literal>) sign followed by two hex digits and spaces
encoded as plus (<literal>+</literal>) signs. It is encoded the
same way that the posted data from a WWW form is encoded, that is
the same way as in
<literal>application/x-www-form-urlencoded</literal> media type.
This differs from the RFC1738 encoding (see
<function>rawurlencode</function>) in that for historical
reasons, spaces are encoded as plus (+) signs. This function is
convenient when encoding a string to be used in a query part of
an URL, as a convenient way to pass variables to the next page:
<example>
<title><function>urlencode</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
echo '<a href="mycgi?foo=', urlencode($userinput), '">';
?>
]]>
</programlisting>
</example>
</para>
<para>
Note: Be careful about variables that may match HTML entities.
Things like &amp, &copy and &pound are parsed by the
browser and the actual entity is used instead of the desired
variable name. This is an obvious hassle that the W3C has been
telling people about for years. The reference is here:
<ulink url="&url.argsep;">&url.argsep;</ulink> PHP supports
changing the argument separator to the W3C-suggested semi-colon
through the arg_separator .ini directive. Unfortunately most user
agents do not send form data in this semi-colon separated format.
A more portable way around this is to use &amp; instead of
& as the separator. You don't need to change PHP's
arg_separator for this. Leave it as &, but simply encode
your URLs using htmlentities(urlencode($data)).
</para>
<para>
<example>
<title><function>urlencode</function> and <function>htmlentities</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
echo '<a href="mycgi?foo=', htmlentities(urlencode($userinput)), '">';
?>
]]>
</programlisting>
</example>
</para>
<para>
See also <function>urldecode</function>,
<function>htmlentities</function>,
<function>rawurldecode</function> and
<function>rawurlencode</function>.
</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
-->