mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-28 14:58:55 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@330316 c90b9560-bf6c-de11-be94-00142212c4b1
140 lines
3.3 KiB
XML
140 lines
3.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
|
|
<refentry xml:id="wrappers.data" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" role="noversion">
|
|
<refnamediv>
|
|
<refname>data://</refname>
|
|
<refpurpose>Data (RFC 2397)</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description"><!-- {{{ -->
|
|
&reftitle.description;
|
|
<para>
|
|
The <filename>data:</filename> (<link xlink:href="&url.rfc;2397">RFC
|
|
2397</link>) stream wrapper is available since PHP 5.2.0.
|
|
</para>
|
|
</refsect1><!-- }}} -->
|
|
|
|
<refsect1 role="usage"> <!-- {{{ -->
|
|
&reftitle.usage;
|
|
<itemizedlist>
|
|
<listitem><simpara><filename>data://text/plain;base64,</filename></simpara></listitem>
|
|
</itemizedlist>
|
|
</refsect1> <!-- }}} -->
|
|
|
|
<refsect1 role="options"><!-- {{{ -->
|
|
&reftitle.options;
|
|
<para>
|
|
<table>
|
|
<title>Wrapper Summary</title>
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>Attribute</entry>
|
|
<entry>Supported</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>Restricted by <link linkend="ini.allow-url-fopen">allow_url_fopen</link></entry>
|
|
<entry>No</entry>
|
|
</row>
|
|
<row>
|
|
<entry>Restricted by <link linkend="ini.allow-url-include">allow_url_include</link></entry>
|
|
<entry>Yes</entry>
|
|
</row>
|
|
<row>
|
|
<entry>Allows Reading</entry>
|
|
<entry>Yes</entry>
|
|
</row>
|
|
<row>
|
|
<entry>Allows Writing</entry>
|
|
<entry>No</entry>
|
|
</row>
|
|
<row>
|
|
<entry>Allows Appending</entry>
|
|
<entry>No</entry>
|
|
</row>
|
|
<row>
|
|
<entry>Allows Simultaneous Reading and Writing</entry>
|
|
<entry>No</entry>
|
|
</row>
|
|
<row>
|
|
<entry>Supports <function>stat</function></entry>
|
|
<entry>No</entry>
|
|
</row>
|
|
<row>
|
|
<entry>Supports <function>unlink</function></entry>
|
|
<entry>No</entry>
|
|
</row>
|
|
<row>
|
|
<entry>Supports <function>rename</function></entry>
|
|
<entry>No</entry>
|
|
</row>
|
|
<row>
|
|
<entry>Supports <function>mkdir</function></entry>
|
|
<entry>No</entry>
|
|
</row>
|
|
<row>
|
|
<entry>Supports <function>rmdir</function></entry>
|
|
<entry>No</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
</para>
|
|
</refsect1> <!-- }}} -->
|
|
|
|
<refsect1 role="examples"><!-- {{{ -->
|
|
&reftitle.examples;
|
|
<example>
|
|
<title>Print data:// contents</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
// prints "I love PHP"
|
|
echo file_get_contents('data://text/plain;base64,SSBsb3ZlIFBIUAo=');
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
|
|
<example>
|
|
<title>Fetch the media type</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$fp = fopen('data://text/plain;base64,', 'r');
|
|
$meta = stream_get_meta_data($fp);
|
|
|
|
// prints "text/plain"
|
|
echo $meta['mediatype'];
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</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:"~/.phpdoc/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
|
|
-->
|
|
|