cvs: phpdoc-pl /reference/dir/functions opendir.xml

From: Date: Mon, 07 Mar 2005 16:02:13 +0000
Subject: cvs: phpdoc-pl /reference/dir/functions opendir.xml
Groups: php.doc.pl 
Request: Send a blank email to doc-pl+get-539@lists.php.net to get a copy of this message
leszek Mon Mar 7 11:02:13 2005 EDT Added files: /phpdoc-pl/reference/dir/functions opendir.xml Log: [leniwiec] *** empty log message *** http://cvs.php.net/co.php/phpdoc-pl/reference/dir/functions/opendir.xml?r=1.1&p=1 Index: phpdoc-pl/reference/dir/functions/opendir.xml +++ phpdoc-pl/reference/dir/functions/opendir.xml <?xml version="1.0" encoding="iso-8859-2"?> <!-- EN-Revision: 1.12 Maintainer: leniwiec Status: ready --> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/dir.xml, last change in rev 1.2 --> <refentry id="function.opendir"> <refnamediv> <refname>opendir</refname> <refpurpose>Otwiera katalog</refpurpose> </refnamediv> <refsect1> &reftitle.description; <methodsynopsis> <type>resource</type><methodname>opendir</methodname> <methodparam><type>string</type><parameter>path</parameter></methodparam> </methodsynopsis> <para> Zwraca wska¼nik do otwartego katalogu, który mo¿e byæ nastêpnie wykorzystany przez <function>closedir</function>, <function>readdir</function>, oraz <function>rewinddir</function>. </para> <para> Je¶li <parameter>path</parameter> nie jest katalogiem lub je¶li katalog nie posiada odpowiednich praw dostêpu, lub gdy system plików zawiód³ <function>opendir</function> zwróci &false; i wygeneruje b³±d PHP <link linkend="errorfunc.constants"> E_WARNING</link>. Mo¿na wy³±czyæ wy¶wietlanie b³êdów <function>opendir</function> poprzez postawienie znaku '<link linkend="language.operators.errorcontrol">@</link>' przed wywo³aniem funkcji. </para> <para> <example> <title>Przyk³ad u¿ycia <function>opendir</function></title> <programlisting role="php"> <![CDATA[ <?php $dir = "/etc/php5/"; // Otwarcie prawid³owego katalogu i pobranie jego zawarto¶ci if (is_dir($dir)) { if ($dh = opendir($dir)) { while (($file = readdir($dh)) !== false) { echo "filename: $file : filetype: " . filetype($dir . $file) . "\n"; } closedir($dh); } } ?> ]]> </programlisting> &example.outputs.similar; <screen> <![CDATA[ filename: . : filetype: dir filename: .. : filetype: dir filename: apache : filetype: dir filename: cgi : filetype: dir filename: cli : filetype: dir ]]> </screen> </example> </para> <para> Od wersji PHP 4.3.0 <parameter>path</parameter> mo¿e byæ równie¿ URL-em odnosz±cym siê do katalogu, jednak tylko <literal>file://</literal> URL wrapper jest wspierany w wersji PHP 4.3. Od wersji PHP 5.0.0, zosta³ dodany <literal>ftp://</literal> URL wrapper. </para> <para> Patrz tak¿e: <function>is_dir</function>, <function>readdir</function>, oraz <link linkend="class.dir">Dir</link> </para> </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:"../../../../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 -->

« previous php.doc.pl (#539) next »