cvs: phpdoc-pl /reference/filesystem/functions popen.xml
| From: | Leszek Krupinski | Date: | Mon, 07 Mar 2005 01:04:44 +0000 |
| Subject: | cvs: phpdoc-pl /reference/filesystem/functions popen.xml | ||
| Groups: | php.doc.pl | ||
| Request: | Send a blank email to doc-pl+get-507@lists.php.net to get a copy of this message | ||
leszek Sun Mar 6 20:04:44 2005 EDT
Modified files:
/phpdoc-pl/reference/filesystem/functions popen.xml
Log:
[adi] update to rev 1.13
http://cvs.php.net/diff.php/phpdoc-pl/reference/filesystem/functions/popen.xml?r1=1.2&r2=1.3&ty=u
Index: phpdoc-pl/reference/filesystem/functions/popen.xml
diff -u phpdoc-pl/reference/filesystem/functions/popen.xml:1.2
phpdoc-pl/reference/filesystem/functions/popen.xml:1.3
--- phpdoc-pl/reference/filesystem/functions/popen.xml:1.2 Wed Apr 17 03:16:09 2002
+++ phpdoc-pl/reference/filesystem/functions/popen.xml Sun Mar 6 20:04:44 2005
@@ -1,46 +1,78 @@
<?xml version="1.0" encoding="iso-8859-2"?>
<!-- splitted from ./pl/functions/filesystem.xml, last change in rev 1.1 -->
-<!-- last change to 'popen' in en/ tree in rev 1.2 -->
-<!-- EN-Revision: 1.2 Maintainer: adi Status: partial -->
-<!-- OLD-Revision: 1.115/EN.1.2 -->
+<!-- EN-Revision: 1.13 Maintainer: adi Status: ready -->
<refentry id="function.popen">
<refnamediv>
<refname>popen</refname>
- <refpurpose>Opens process file pointer</refpurpose>
+ <refpurpose>Otwiera wska¼nik pliku do procesu</refpurpose>
</refnamediv>
<refsect1>
- <title>Description</title>
+ <title>Opis</title>
<methodsynopsis>
- <type>int</type><methodname>popen</methodname>
-
<methodparam><type>string</type><parameter>command</parameter></methodparam>
-
<methodparam><type>string</type><parameter>mode</parameter></methodparam>
+ <type>resource</type><methodname>popen</methodname>
+
<methodparam><type>string</type><parameter>polecenie</parameter></methodparam>
+
<methodparam><type>string</type><parameter>tryb</parameter></methodparam>
</methodsynopsis>
<para>
- Opens a pipe to a process executed by forking the command given
- by command.
- </para>
+ Otwiera potok do procesu uruchomionego przez rozwidlenie polecenia (ang. forking)
+ podanego w parametrze polecenie.
+ </para>
+ <para>
+ Zwraca wska¼nik pliku identyczny do tego zwracanego przez
+ <function>fopen</function> z wyj±tkiem tego, ¿e jest on jednokierunkowy
+ (mo¿e byæ tylko u¿yty do odczytu lub zapisu) i musi byæ zamkniêty za pomoc±
+ <function>pclose</function>. Wska¼nik ten mo¿e byæ u¿yty z
+ <function>fgets</function>, <function>fgetss</function> i
+ <function>fwrite</function>.
+ </para>
<para>
- Returns a file pointer identical to that returned by
- <function>fopen</function>, except that it is unidirectional (may
- only be used for reading or writing) and must be closed with
- <function>pclose</function>. This pointer may be used with
- <function>fgets</function>, <function>fgetss</function>, and
- <function>fputs</function>.
+ W przypadku b³êdu, zwraca &false;.
</para>
+ <note>
+ <para>
+ Je¶li szukasz dwukierunkowej obs³ugi (w obie strony), u¿yj
+ <function>proc_open</function>.
+ </para>
+ </note>
<para>
- If an error occurs, returns &false;.
+ <example>
+ <title><function>popen</function> przyk³ad</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+$uchwyt = popen("/bin/ls", "r");
+?>
+]]>
+ </programlisting>
+ </example>
</para>
<para>
- <informalexample>
+ Je¶li polecenie uruchamiane nie mo¿e zostaæ znalezione, poprawny
+ zasób jest zwracany. To mo¿e wydawaæ siê dziwne, ale ma sens;
+ pozwala tobie na dostêp do wszystkich informacji o b³êdach zwracanych
+ przez pow³okê.
+ <informalexample>
<programlisting role="php">
<![CDATA[
-$fp = popen ("/bin/ls", "r");
+<?php
+error_reporting(E_ALL);
+
+/* Dodanie przekierowania, aby móc dostaæ stderr. */
+$uchwyt = popen('/sciezka/do/czegos 2>&1', 'r');
+echo "'$uchwyt'; " . gettype($uchwyt) . "\n";
+$czytaj = fread($uchwyt, 2096);
+echo $czytaj;
+pclose($uchwyt);
+?>
]]>
</programlisting>
</informalexample>
</para>
+ ¬e.exec-path;
+ &warn.sm.exec;
<para>
- See also <function>pclose</function>.
+ Patrz tak¿e <function>pclose</function>, <function>fopen</function> i
+ <function>proc_open</function>.
</para>
</refsect1>
</refentry>
@@ -64,4 +96,4 @@
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
--->
+-->
\ No newline at end of file