2010-03-28 22:10:10 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2009-07-11 09:15:58 +00:00
|
|
|
<!-- $Revision$ -->
|
2007-06-20 22:25:43 +00:00
|
|
|
<refentry xml:id="function.base64-decode" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
2006-03-10 04:54:53 +00:00
|
|
|
<refnamediv>
|
|
|
|
<refname>base64_decode</refname>
|
|
|
|
<refpurpose>Decodes data encoded with MIME base64</refpurpose>
|
|
|
|
</refnamediv>
|
2007-02-03 01:10:52 +00:00
|
|
|
|
|
|
|
<refsect1 role="description">
|
|
|
|
&reftitle.description;
|
2006-03-10 04:54:53 +00:00
|
|
|
<methodsynopsis>
|
|
|
|
<type>string</type><methodname>base64_decode</methodname>
|
2007-02-03 01:10:52 +00:00
|
|
|
<methodparam><type>string</type><parameter>data</parameter></methodparam>
|
2009-01-16 16:14:26 +00:00
|
|
|
<methodparam choice="opt"><type>bool</type><parameter>strict</parameter><initializer>false</initializer></methodparam>
|
2006-03-10 04:54:53 +00:00
|
|
|
</methodsynopsis>
|
|
|
|
<para>
|
2007-02-03 01:10:52 +00:00
|
|
|
Decodes a base64 encoded <parameter>data</parameter>.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="parameters">
|
|
|
|
&reftitle.parameters;
|
|
|
|
<para>
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>data</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2008-11-12 15:28:26 +00:00
|
|
|
The encoded data.
|
2007-02-03 01:10:52 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2007-03-23 16:50:25 +00:00
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>strict</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2008-11-07 10:28:49 +00:00
|
|
|
Returns &false; if input contains character from outside the base64
|
|
|
|
alphabet.
|
2007-03-23 16:50:25 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2007-02-03 01:10:52 +00:00
|
|
|
</variablelist>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="returnvalues">
|
|
|
|
&reftitle.returnvalues;
|
|
|
|
<para>
|
2009-11-09 10:26:08 +00:00
|
|
|
Returns the original data&return.falseforfailure;. The returned data may be
|
2007-02-03 01:10:52 +00:00
|
|
|
binary.
|
2006-03-10 04:54:53 +00:00
|
|
|
</para>
|
2007-02-03 01:10:52 +00:00
|
|
|
</refsect1>
|
|
|
|
|
2007-03-23 16:50:25 +00:00
|
|
|
<refsect1 role="changelog">
|
|
|
|
&reftitle.changelog;
|
|
|
|
<para>
|
|
|
|
<informaltable>
|
|
|
|
<tgroup cols="2">
|
|
|
|
<thead>
|
|
|
|
<row>
|
|
|
|
<entry>&Version;</entry>
|
|
|
|
<entry>&Description;</entry>
|
|
|
|
</row>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<row>
|
|
|
|
<entry>5.2.0</entry>
|
|
|
|
<entry><parameter>strict</parameter> added</entry>
|
|
|
|
</row>
|
|
|
|
</tbody>
|
|
|
|
</tgroup>
|
|
|
|
</informaltable>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
2007-02-03 01:10:52 +00:00
|
|
|
<refsect1 role="examples">
|
|
|
|
&reftitle.examples;
|
2006-03-10 04:54:53 +00:00
|
|
|
<para>
|
|
|
|
<example>
|
|
|
|
<title><function>base64_decode</function> example</title>
|
|
|
|
<programlisting role="php">
|
2003-08-16 14:59:57 +00:00
|
|
|
<![CDATA[
|
|
|
|
<?php
|
|
|
|
$str = 'VGhpcyBpcyBhbiBlbmNvZGVkIHN0cmluZw==';
|
|
|
|
echo base64_decode($str);
|
|
|
|
?>
|
|
|
|
]]>
|
2006-03-10 04:54:53 +00:00
|
|
|
</programlisting>
|
2007-02-03 01:10:52 +00:00
|
|
|
&example.outputs;
|
2006-03-10 04:54:53 +00:00
|
|
|
<screen>
|
2003-08-16 14:59:57 +00:00
|
|
|
<![CDATA[
|
|
|
|
This is an encoded string
|
|
|
|
]]>
|
2006-03-10 04:54:53 +00:00
|
|
|
</screen>
|
|
|
|
</example>
|
|
|
|
</para>
|
2007-02-03 01:10:52 +00:00
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="seealso">
|
|
|
|
&reftitle.seealso;
|
2006-03-10 04:54:53 +00:00
|
|
|
<para>
|
2007-02-03 01:10:52 +00:00
|
|
|
<simplelist>
|
|
|
|
<member><function>base64_encode</function></member>
|
2007-06-20 22:25:43 +00:00
|
|
|
<member><link xlink:href="&url.rfc;2045">RFC 2045</link> section 6.8</member>
|
2007-02-03 01:10:52 +00:00
|
|
|
</simplelist>
|
2006-03-10 04:54:53 +00:00
|
|
|
</para>
|
|
|
|
</refsect1>
|
2007-02-03 01:10:52 +00:00
|
|
|
|
2006-03-10 04:54:53 +00:00
|
|
|
</refentry>
|
2002-04-15 00:12:54 +00:00
|
|
|
|
|
|
|
<!-- 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
|
2009-09-25 07:04:39 +00:00
|
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
2002-04-15 00:12:54 +00:00
|
|
|
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
|
|
|
|
-->
|