svn: /phpdoc/zh/trunk/appendices/ wrappers.xml

From: Date: Fri, 25 Sep 2009 14:45:30 +0000
Subject: svn: /phpdoc/zh/trunk/appendices/ wrappers.xml
Groups: php.doc.zh 
Request: Send a blank email to doc-zh+get-3216@lists.php.net to get a copy of this message
haohappy Fri, 25 Sep 2009 14:45:30 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=288798 Log: phar and glob added. Changed paths: U phpdoc/zh/trunk/appendices/wrappers.xml Modified: phpdoc/zh/trunk/appendices/wrappers.xml =================================================================== --- phpdoc/zh/trunk/appendices/wrappers.xml 2009-09-25 14:43:00 UTC (rev 288797) +++ phpdoc/zh/trunk/appendices/wrappers.xml 2009-09-25 14:45:30 UTC (rev 288798) @@ -781,6 +781,173 @@ </table> </para> </section> + + <section xml:id="wrappers.glob"> + <title>Glob</title> + <simpara> + The <filename>glob:</filename> stream wrapper is available since PHP 5.3.0. + </simpara> + + <example> + <title>Basic usage</title> + <programlisting role="php"> +<![CDATA[ +<?php +// Loop over all *.php files in ext/spl/examples/ directory +// and print the filename and its size +$it = new DirectoryIterator("glob://ext/spl/examples/*.php"); +foreach($it as $f) { + printf("%s: %.1FK\n", $f->getFilename(), $f->getSize()/1024); +} +?> +]]> + </programlisting> + <screen> +<![CDATA[ +tree.php: 1.0K +findregex.php: 0.6K +findfile.php: 0.7K +dba_dump.php: 0.9K +nocvsdir.php: 1.1K +phar_from_dir.php: 1.0K +ini_groups.php: 0.9K +directorytree.php: 0.9K +dba_array.php: 1.1K +class_tree.php: 1.8K +]]> + </screen> + </example> + + <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>No</entry> + </row> + <row> + <entry>Allows Reading</entry> + <entry>No</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> + </section> + + <section xml:id="wrappers.phar"> + <title>Phar</title> + <simpara> + The <filename>phar://</filename> stream wrapper is available since + PHP 5.3.0. See <link linkend="phar.using.stream">Phar stream wrapper</link> + for detailed description. + </simpara> + + <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>No</entry> + </row> + <row> + <entry>Allows Reading</entry> + <entry>Yes</entry> + </row> + <row> + <entry>Allows Writing</entry> + <entry>Yes</entry> + </row> + <row> + <entry>Allows Appending</entry> + <entry>No</entry> + </row> + <row> + <entry>Allows Simultaneous Reading and Writing</entry> + <entry>Yes</entry> + </row> + <row> + <entry>Supports <function>stat</function></entry> + <entry>Yes</entry> + </row> + <row> + <entry>Supports <function>unlink</function></entry> + <entry>Yes</entry> + </row> + <row> + <entry>Supports <function>rename</function></entry> + <entry>Yes</entry> + </row> + <row> + <entry>Supports <function>mkdir</function></entry> + <entry>Yes</entry> + </row> + <row> + <entry>Supports <function>rmdir</function></entry> + <entry>Yes</entry> + </row> + </tbody> + </tgroup> + </table> + </para> + </section> + <section xml:id="wrappers.ssh2"> <title>Secure Shell 2</title> <simpara>

« previous php.doc.zh (#3216) next »