mirror of
https://github.com/php/doc-zh.git
synced 2026-03-23 22:52:08 +01:00
142 lines
3.4 KiB
XML
142 lines
3.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
||
<!-- $Revision$ -->
|
||
<!-- EN-Revision: 8bc832a464e33122e8129f5a623bd845b69fa7e0 Maintainer: daijie Status: ready -->
|
||
<refentry xml:id="wrappers.data" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" annotations="verify_info:false" role="stream_wrapper">
|
||
<refnamediv>
|
||
<refname>data://</refname>
|
||
<refpurpose>数据(RFC 2397)</refpurpose>
|
||
</refnamediv>
|
||
|
||
<refsect1 role="description"><!-- {{{ -->
|
||
&reftitle.description;
|
||
<para>
|
||
<!-- TODO Proper description -->
|
||
<filename>data:</filename>(<link xlink:href="&url.rfc;2397">RFC
|
||
2397</link>)数据流封装器。
|
||
</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>封装协议摘要</title>
|
||
<tgroup cols="2">
|
||
<thead>
|
||
<row>
|
||
<entry>属性</entry>
|
||
<entry>支持</entry>
|
||
</row>
|
||
</thead>
|
||
<tbody>
|
||
<row>
|
||
<entry>受限于 <link linkend="ini.allow-url-fopen">allow_url_fopen</link></entry>
|
||
<entry>Yes</entry>
|
||
</row>
|
||
<row>
|
||
<entry>受限于 <link linkend="ini.allow-url-include">allow_url_include</link></entry>
|
||
<entry>Yes</entry>
|
||
</row>
|
||
<row>
|
||
<entry>允许读取</entry>
|
||
<entry>Yes</entry>
|
||
</row>
|
||
<row>
|
||
<entry>允许写入</entry>
|
||
<entry>No</entry>
|
||
</row>
|
||
<row>
|
||
<entry>允许追加</entry>
|
||
<entry>No</entry>
|
||
</row>
|
||
<row>
|
||
<entry>允许同时读写</entry>
|
||
<entry>No</entry>
|
||
</row>
|
||
<row>
|
||
<entry>支持 <function>stat</function></entry>
|
||
<entry>No</entry>
|
||
</row>
|
||
<row>
|
||
<entry>支持 <function>unlink</function></entry>
|
||
<entry>No</entry>
|
||
</row>
|
||
<row>
|
||
<entry>支持 <function>rename</function></entry>
|
||
<entry>No</entry>
|
||
</row>
|
||
<row>
|
||
<entry>支持 <function>mkdir</function></entry>
|
||
<entry>No</entry>
|
||
</row>
|
||
<row>
|
||
<entry>支持 <function>rmdir</function></entry>
|
||
<entry>No</entry>
|
||
</row>
|
||
</tbody>
|
||
</tgroup>
|
||
</table>
|
||
</para>
|
||
</refsect1> <!-- }}} -->
|
||
|
||
<refsect1 role="examples"><!-- {{{ -->
|
||
&reftitle.examples;
|
||
<example>
|
||
<title>打印 data:// 的内容</title>
|
||
<programlisting role="php">
|
||
<![CDATA[
|
||
<?php
|
||
// 打印 "I love PHP"
|
||
echo file_get_contents('data://text/plain;base64,SSBsb3ZlIFBIUAo=');
|
||
?>
|
||
]]>
|
||
</programlisting>
|
||
</example>
|
||
|
||
<example>
|
||
<title>获取媒体类型</title>
|
||
<programlisting role="php">
|
||
<![CDATA[
|
||
<?php
|
||
$fp = fopen('data://text/plain;base64,', 'r');
|
||
$meta = stream_get_meta_data($fp);
|
||
|
||
// 打印 "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
|
||
-->
|
||
|