cvs: phpdoc /en/reference/url/functions base64-decode.xml base64-encode.xml

From: Date: Sat, 16 Aug 2003 14:59:57 +0000
Subject: cvs: phpdoc /en/reference/url/functions base64-decode.xml base64-encode.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969355832@lists.php.net to get a copy of this message
didou Sat Aug 16 10:59:57 2003 EDT Modified files: /phpdoc/en/reference/url/functions base64-decode.xml base64-encode.xml Log: added two examples Index: phpdoc/en/reference/url/functions/base64-decode.xml diff -u phpdoc/en/reference/url/functions/base64-decode.xml:1.5 phpdoc/en/reference/url/functions/base64-decode.xml:1.6 --- phpdoc/en/reference/url/functions/base64-decode.xml:1.5 Thu Aug 14 04:42:38 2003 +++ phpdoc/en/reference/url/functions/base64-decode.xml Sat Aug 16 10:59:57 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <!-- splitted from ./en/functions/url.xml, last change in rev 1.2 --> <refentry id="function.base64-decode"> <refnamediv> @@ -16,6 +16,27 @@ <function>base64_decode</function> decodes <parameter>encoded_data</parameter> and returns the original data or &false; on failure. The returned data may be binary. + </para> + <para> + <example> + <title><function>base64_decode</function> example</title> + <programlisting role="php"> +<![CDATA[ +<?php +$str = 'VGhpcyBpcyBhbiBlbmNvZGVkIHN0cmluZw=='; +echo base64_decode($str); +?> +]]> + </programlisting> + <para> + This example will produce : + </para> + <screen> +<![CDATA[ +This is an encoded string +]]> + </screen> + </example> </para> <para> See also <function>base64_encode</function> and Index: phpdoc/en/reference/url/functions/base64-encode.xml diff -u phpdoc/en/reference/url/functions/base64-encode.xml:1.4 phpdoc/en/reference/url/functions/base64-encode.xml:1.5 --- phpdoc/en/reference/url/functions/base64-encode.xml:1.4 Wed May 7 17:31:31 2003 +++ phpdoc/en/reference/url/functions/base64-encode.xml Sat Aug 16 10:59:57 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <!-- splitted from ./en/functions/url.xml, last change in rev 1.2 --> <refentry id="function.base64-encode"> <refnamediv> @@ -20,11 +20,33 @@ </para> <para> Base64-encoded data takes about 33% more space than the original - data.</para> + data. + </para> + <para> + <example> + <title><function>base64_encode</function> example</title> + <programlisting role="php"> +<![CDATA[ +<?php + $str = 'This is an encoded string'; + echo base64_encode($str); +?> +]]> + </programlisting> + <para> + This example will produce : + </para> + <screen> +<![CDATA[ +VGhpcyBpcyBhbiBlbmNvZGVkIHN0cmluZw== +]]> + </screen> + </example> + </para> <para> - See also: + See also <function>base64_decode</function>, - <function>chunk_split</function>, + <function>chunk_split</function> and <ulink url="&url.rfc;2045">RFC 2045</ulink> section 6.8. </para> </refsect1>

« previous php.doc (#969355832) next »