cvs: phpdoc-hu /reference/exec/functions exec.xml

From: Date: Wed, 04 Aug 2004 13:48:05 +0000
Subject: cvs: phpdoc-hu /reference/exec/functions exec.xml
Groups: php.doc.hu 
Request: Send a blank email to doc-hu+get-841@lists.php.net to get a copy of this message
cece Wed Aug 4 09:48:05 2004 EDT Modified files: /phpdoc-hu/reference/exec/functions exec.xml Log: sync http://cvs.php.net/diff.php/phpdoc-hu/reference/exec/functions/exec.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc-hu/reference/exec/functions/exec.xml diff -u phpdoc-hu/reference/exec/functions/exec.xml:1.3 phpdoc-hu/reference/exec/functions/exec.xml:1.4 --- phpdoc-hu/reference/exec/functions/exec.xml:1.3 Wed Sep 18 11:35:25 2002 +++ phpdoc-hu/reference/exec/functions/exec.xml Wed Aug 4 09:48:05 2004 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="iso-8859-2"?> <!-- splitted from ./hu/functions/exec.xml, last change in rev 1.4 --> <!-- last change to 'exec' in en/ tree in rev 1.2 --> -<!-- EN-Revision: 1.3 Maintainer: goba Status: ready --> +<!-- EN-Revision: 1.13 Maintainer: goba Status: ready --> <!-- OLD-Revision: 1.27/EN.1.2 --> <refentry id="function.exec"> <refnamediv> @@ -13,8 +13,8 @@ <methodsynopsis> <type>string</type><methodname>exec</methodname> <methodparam><type>string</type><parameter>command</parameter></methodparam> - <methodparam choice="opt"><type>array</type><parameter>array</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>return_var</parameter></methodparam> + <methodparam choice="opt"><type>array</type><parameter>&amp;output</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>&amp;return_var</parameter></methodparam> </methodsynopsis> <para> Az <function>exec</function> lefuttatja a @@ -24,38 +24,44 @@ a parancs eredménye minden adatfeldolgozás nélkül kiírása kerüljön. </para> <para> - Az <parameter>array</parameter> paraméter megadásával a program kimenetét - a PHP soronként a megadott tömb végéhez fûzi. Ha az átadott tömb már - tartalmaz néhány elemet, akkor az <function>exec</function> a benne lévõ - adatok után fûzi a sorokat. Ha nincs szükség a régi elemekre, akkor az + Az <parameter>output</parameter> paraméter megadásával a program kimenetét + a PHP soronként a megadott tömb végéhez fûzi. A sorvége jelek, mint + a <literal>\n</literal> például, nem kerülnek bele a tömbbe. Ha az átadott + tömb már tartalmaz néhány elemet, akkor az <function>exec</function> a benne + lévõ adatok után fûzi a sorokat. Ha nincs szükség a régi elemekre, akkor az <function>unset</function> függvénnyel lehet törölni az egész tömböt, az <function>exec</function> meghívása elõtt. </para> <para> - Az <parameter>array</parameter> paraméterrel együtt a + Az <parameter>output</parameter> paraméterrel együtt a <parameter>return_var</parameter> a futtatott parancs visszatérési állapotát tárolja el. </para> - <warning> - <para> - Ha felhasználótól származó adatot kell átadni ennek a függvénynek, akkor - elõtte használd az <function>escapeshellcmd</function> függvényt, annak - biztosítására, hogy nem tudnak a felhasználók tetszõleges parancsot - futtatni. - </para> - </warning> - <note> - <para> - Ezzel a függvénnyel elindított de háttérben futó program kimenetét - mindenképpen fájlba vagy valamilyen más kimeneti csatornába kell - átirányítani. Ellenkezõ esetben a PHP várakozni fog addig, amíg a - program futása be nem fejezõdik. - </para> - </note> <para> - Lásd még: <function>system</function>, - <function>passthru</function>, <function>popen</function>, - <function>escapeshellcmd</function> és a + <example> + <title>Egy <function>exec</function> példa</title> + <programlisting role="php"> +<![CDATA[ +<?php +// az aktuális php/http processzt birtokló felhasználó nevét írja ki +// (feltéve, ha olyan rendszeren vagyunk, amelyen a "whoami" elérhetõ) +echo exec('whoami'); +?> +]]> + </programlisting> + </example> + </para> + &warn.escapeshell; + &warn.exec-bg; + &warn.exec-path; + &warn.sm.exec; + <para> + Lásd még: + <function>system</function>, + <function>passthru</function>, + <function>popen</function>, + <function>escapeshellcmd</function>, + <function>pcntl_exec</function> és a <link linkend="language.operators.execution">végrehajtó operátor</link>! </para> </refsect1>

« previous php.doc.hu (#841) next »