cvs: phpdoc-ja /reference/exec reference.xml /reference/exec/functions escapeshellarg.xml escapeshellcmd.xml exec.xml passthru.xml proc-close.xml
proc-get-status.xml shell-exec.xml system.xml

From: Date: Mon, 25 Jul 2005 16:32:29 +0000
Subject: cvs: phpdoc-ja /reference/exec reference.xml /reference/exec/functions escapeshellarg.xml escapeshellcmd.xml exec.xml passthru.xml proc-close.xml
proc-get-status.xml shell-exec.xml system.xml
Groups: php.doc.ja 
Request: Send a blank email to doc-ja+get-1090@lists.php.net to get a copy of this message
shimooka Mon Jul 25 12:32:29 2005 EDT Modified files: /phpdoc-ja/reference/exec reference.xml /phpdoc-ja/reference/exec/functions escapeshellarg.xml escapeshellcmd.xml exec.xml passthru.xml proc-close.xml proc-get-status.xml shell-exec.xml system.xml Log: translation updated

http://cvs.php.net/diff.php/phpdoc-ja/reference/exec/reference.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc-ja/reference/exec/reference.xml diff -u phpdoc-ja/reference/exec/reference.xml:1.4 phpdoc-ja/reference/exec/reference.xml:1.5 --- phpdoc-ja/reference/exec/reference.xml:1.4 Sun Jan 9 21:15:11 2005 +++ phpdoc-ja/reference/exec/reference.xml Mon Jul 25 12:32:29 2005 @@ -1,17 +1,17 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.4 $ --> -<!-- EN-Revision: 1.8 Maintainer: hirokawa Status: ready --> +<!-- $Revision: 1.5 $ --> +<!-- EN-Revision: 1.9 Maintainer: hirokawa Status: ready --> <reference id="ref.exec"> <title>プログラム実行関数</title> <titleabbrev>プログラム実行</titleabbrev> <partintro> <section id="exec.intro"> - &reftitle.intro; - <simpara> - 以下の関数は、システム自体の上でコマンドを実行したり、こうしたコマ - ンドの安全に実行する手段を提供します。 - </simpara> + &reftitle.intro; + <simpara> + 以下の関数は、システム自体の上でコマンドを実行したり、こうしたコマ + ンドの安全に実行する手段を提供します。 + </simpara> </section> <section id="exec.requirements"> @@ -40,7 +40,7 @@ </section> <section id="exec.seealso"> - &reftitle.seealso; + &reftitle.seealso; <para> 以下の関数は、 <link linkend="language.operators.execution">バックティック演算子</link> http://cvs.php.net/diff.php/phpdoc-ja/reference/exec/functions/escapeshellarg.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-ja/reference/exec/functions/escapeshellarg.xml diff -u phpdoc-ja/reference/exec/functions/escapeshellarg.xml:1.5 phpdoc-ja/reference/exec/functions/escapeshellarg.xml:1.6 --- phpdoc-ja/reference/exec/functions/escapeshellarg.xml:1.5 Sun Jan 9 21:15:12 2005 +++ phpdoc-ja/reference/exec/functions/escapeshellarg.xml Mon Jul 25 12:32:29 2005 @@ -1,12 +1,15 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.5 $ --> -<!-- EN-Revision: 1.7 Maintainer: hirokawa Status: ready --> +<!-- $Revision: 1.6 $ --> +<!-- EN-Revision: 1.9 Maintainer: hirokawa Status: ready --> +<!-- CREDITS: shimooka --> +<!-- splitted from ./en/functions/exec.xml, last change in rev 1.8 --> <refentry id="function.escapeshellarg"> <refnamediv> <refname>escapeshellarg</refname> <refpurpose>シェル引数として使用される文字列をエスケープする</refpurpose> </refnamediv> - <refsect1> + + <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>string</type><methodname>escapeshellarg</methodname> @@ -22,10 +25,37 @@ <function>system</function>そして <link linkend="language.operators.execution">バックティック演算子</link> を含むシェル関数が含まれます。 - 標準的な使用法は次のようになります。 </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>arg</parameter></term> + <listitem> + <para> + エスケープされる引数 + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + エスケープされた文字列 + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> - <informalexample> + <example> + <title><function>escapeshellarg</function> の例</title> <programlisting role="php"> <![CDATA[ <?php @@ -33,16 +63,21 @@ ?> ]]> </programlisting> - </informalexample> + </example> </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - <function>escapeshellcmd</function>, - <function>exec</function>, <function>popen</function>, - <function>system</function>および<link - linkend="language.operators.execution">バックティック演算子</link> - も参照ください。 + <simplelist> + <member><function>escapeshellcmd</function></member> + <member><function>exec</function></member> + <member><function>popen</function></member> + <member><function>system</function></member> + <member><link linkend="language.operators.execution">バックティック演算子</link></member> + </simplelist> </para> - </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-ja/reference/exec/functions/escapeshellcmd.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-ja/reference/exec/functions/escapeshellcmd.xml diff -u phpdoc-ja/reference/exec/functions/escapeshellcmd.xml:1.5 phpdoc-ja/reference/exec/functions/escapeshellcmd.xml:1.6 --- phpdoc-ja/reference/exec/functions/escapeshellcmd.xml:1.5 Sun Jan 9 21:15:12 2005 +++ phpdoc-ja/reference/exec/functions/escapeshellcmd.xml Mon Jul 25 12:32:29 2005 @@ -1,12 +1,15 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.5 $ --> -<!-- EN-Revision: 1.5 Maintainer: hirokawa Status: ready --> +<!-- $Revision: 1.6 $ --> +<!-- EN-Revision: 1.7 Maintainer: hirokawa Status: ready --> +<!-- splitted from ./en/functions/exec.xml, last change in rev 1.2 --> +<!-- CREDITS: shimooka --> <refentry id="function.escapeshellcmd"> <refnamediv> <refname>escapeshellcmd</refname> <refpurpose>シェルのメタ文字をエスケープする</refpurpose> </refnamediv> - <refsect1> + + <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>string</type><methodname>escapeshellcmd</methodname> @@ -17,34 +20,67 @@ ンドをだまして勝手なコマンドを実行する可能性がある文字をエスケー プします。この関数は、ユーザに入力されたデータを関数 <function>exec</function>または<function>system</function>または、 - <link linkend="language.operators.execution">backtick 演算子</link> + <link linkend="language.operators.execution">バックティック演算子</link> に渡す前に全てエスケープを行う場合に使用するべきです。 - 標準的な使い方は以下のようになるでしょう。 </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>command</parameter></term> + <listitem> + <para> + エスケープされるコマンド + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> - <informalexample> + エスケープされた文字列 + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title><function>escapeshellcmd</function> の例</title> <programlisting role="php"> <![CDATA[ <?php $e = escapeshellcmd($userinput); - -// ここでは、$eにスペースがあるかは考慮していません + +// ここでは $e がスペースを含んでいても関係ない system("echo $e"); $f = escapeshellcmd($filename); - -// ここでは配慮し、クオートします + +// ここでは気を遣い、クォートを使用する system("touch \"/tmp/$f\"; ls -l \"/tmp/$f\""); ?> ]]> </programlisting> - </informalexample> + </example> </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - <function>escapeshellarg</function>, - <function>exec</function>, <function>popen</function>, - <function>system</function>, <link - linkend="language.operators.execution">バックティック演算子</link> - も参照ください。 + <simplelist> + <member><function>escapeshellarg</function></member> + <member><function>exec</function></member> + <member><function>popen</function></member> + <member><function>system</function></member> + <member><link linkend="language.operators.execution">バックティック演算子</link></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-ja/reference/exec/functions/exec.xml?r1=1.6&r2=1.7&ty=u Index: phpdoc-ja/reference/exec/functions/exec.xml diff -u phpdoc-ja/reference/exec/functions/exec.xml:1.6 phpdoc-ja/reference/exec/functions/exec.xml:1.7 --- phpdoc-ja/reference/exec/functions/exec.xml:1.6 Sun Jan 9 21:15:12 2005 +++ phpdoc-ja/reference/exec/functions/exec.xml Mon Jul 25 12:32:29 2005 @@ -1,12 +1,15 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.6 $ --> -<!-- EN-Revision: 1.15 Maintainer: hirokawa Status: ready --> +<!-- $Revision: 1.7 $ --> +<!-- EN-Revision: 1.17 Maintainer: hirokawa Status: ready --> +<!-- CREDITS: shimooka --> +<!-- splitted from ./en/functions/exec.xml, last change in rev 1.2 --> <refentry id="function.exec"> <refnamediv> <refname>exec</refname> - <refpurpose>外部プログラムを実行します</refpurpose> + <refpurpose>外部プログラムを実行する</refpurpose> </refnamediv> - <refsect1> + + <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>string</type><methodname>exec</methodname> @@ -15,30 +18,70 @@ <methodparam choice="opt"><type>int</type><parameter role="reference">return_var</parameter></methodparam> </methodsynopsis> <para> - <function>exec</function>は指定された - <parameter>command</parameter>を実行しますが、一切の出力はありま - せん。ただ単に、コマンド結果の最後の行を返すだけです。コマンドを実行 - し、一切干渉を受けずに直接コマンドから全てのデータを受けとる必要が - あるならば、<function>PassThru</function> 関数を使ってください。 + <function>exec</function> は指定されたコマンド + <parameter>command</parameter> を実行します。 </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - 引数<parameter>output</parameter>が存在する場合、指定した配列は、 - コマンドからの出力の各行で埋められます。 - <literal>\n</literal>のような行末記号は、この配列には含まれません。 - 配列に既に何らかの要素が - 含まれる場合は、<function>exec</function>は配列の最後に追加される - ことに注意してください。関数が要素を追加することを望まないのなら、 - それが <function>exec</function> に渡される前に、配列の - <function>unset</function>を呼び出してください。 + <variablelist> + <varlistentry> + <term><parameter>command</parameter></term> + <listitem> + <para> + 実行するコマンド + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>output</parameter></term> + <listitem> + <para> + 引数<parameter>output</parameter>が存在する場合、指定した配列は、 + コマンドからの出力の各行で埋められます。 + <literal>\n</literal>のような行末記号は、この配列には含まれません。 + 配列に既に何らかの要素が + 含まれる場合は、<function>exec</function>は配列の最後に追加される + ことに注意してください。関数が要素を追加することを望まないのなら、 + それが <function>exec</function> に渡される前に、配列の + <function>unset</function>を呼び出してください。 + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>return_var</parameter></term> + <listitem> + <para> + 引数<parameter>return_var</parameter>が、引数 + <parameter>output</parameter>と共に存在する場合、実行したコマンドの + ステータスがこの変数に書かれます。 + </para> + </listitem> + </varlistentry> + </variablelist> </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> - 引数<parameter>return_var</parameter>が、引数 - <parameter>output</parameter>と共に存在する場合、実行したコマンドの - ステータスがこの変数に書かれます。 + コマンド結果の最後の行を返します。コマンドを実行し、 + 一切干渉を受けずに直接コマンドから全てのデータを受けとる必要が + あるならば、<function>PassThru</function> 関数を使ってください。 </para> <para> + 実行されたコマンドの出力を取得するには、必ず <parameter>output</parameter> + パラメータを設定・使用してください。 + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> <example> - <title><function>exec</function>の例</title> + <title>An <function>exec</function> の例</title> <programlisting role="php"> <![CDATA[ <?php @@ -50,17 +93,27 @@ </programlisting> </example> </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; &warn.escapeshell; &note.exec-bg; &note.exec-path; &warn.sm.exec; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - <function>system</function>, - <function>passthru</function>, <function>popen</function>, - <function>escapeshellcmd</function> - <function>pcntl_exec</function>, <link - linkend="language.operators.execution">バックティック演算子</link> - も参照ください。 + <simplelist> + <member><function>system</function></member> + <member><function>passthru</function></member> + <member><function>escapeshellcmd</function></member> + <member><function>pcntl_exec</function></member> + <member><function>system</function></member> + <member><link linkend="language.operators.execution">バックティック演算子</link></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-ja/reference/exec/functions/passthru.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-ja/reference/exec/functions/passthru.xml diff -u phpdoc-ja/reference/exec/functions/passthru.xml:1.5 phpdoc-ja/reference/exec/functions/passthru.xml:1.6 --- phpdoc-ja/reference/exec/functions/passthru.xml:1.5 Sun Jan 9 21:15:12 2005 +++ phpdoc-ja/reference/exec/functions/passthru.xml Mon Jul 25 12:32:29 2005 @@ -1,12 +1,15 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.5 $ --> -<!-- EN-Revision: 1.7 Maintainer: hirokawa Status: ready --> +<!-- $Revision: 1.6 $ --> +<!-- EN-Revision: 1.9 Maintainer: hirokawa Status: ready --> +<!-- CREDITS: shimooka --> +<!-- splitted from ./en/functions/exec.xml, last change in rev 1.2 --> <refentry id="function.passthru"> <refnamediv> <refname>passthru</refname> - <refpurpose>外部プログラムを実行し、未整形の出力を表示します</refpurpose> + <refpurpose>外部プログラムを実行し、未整形の出力を表示する</refpurpose> </refnamediv> - <refsect1> + + <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>void</type><methodname>passthru</methodname> @@ -27,16 +30,51 @@ プログラムを呼び出すことにより、直接画像を出力する PHP スクリプトを作成 することができます。 </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>command</parameter></term> + <listitem> + <para> + 実行するコマンド + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>return_var</parameter></term> + <listitem> + <para> + 引数<parameter>return_var</parameter>が存在する場合、 + UNIX コマンドのステータスがこの変数に書かれます。 + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; &warn.escapeshell; &note.exec-bg; &note.exec-path; &warn.sm.exec; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - <function>exec</function>, - <function>system</function>, <function>popen</function>, - <function>escapeshellcmd</function>, - <link linkend="language.operators.execution">バックティック演算子</link> - も参照ください。 + <simplelist> + <member><function>exec</function></member> + <member><function>system</function></member> + <member><function>popen</function></member> + <member><function>escapeshellcmd</function></member> + <member><link linkend="language.operators.execution">バックティック演算子</link></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-ja/reference/exec/functions/proc-close.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc-ja/reference/exec/functions/proc-close.xml diff -u phpdoc-ja/reference/exec/functions/proc-close.xml:1.3 phpdoc-ja/reference/exec/functions/proc-close.xml:1.4 --- phpdoc-ja/reference/exec/functions/proc-close.xml:1.3 Sun Jan 9 21:15:12 2005 +++ phpdoc-ja/reference/exec/functions/proc-close.xml Mon Jul 25 12:32:29 2005 @@ -1,23 +1,25 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- $Revision: 1.3 $ --> -<!-- EN-Revision: 1.6 Maintainer: hirokawa Status: ready --> +<!-- $Revision: 1.4 $ --> +<!-- EN-Revision: 1.8 Maintainer: hirokawa Status: ready --> +<!-- CREDITS: shimooka --> +<!-- splitted from ./en/functions/exec.xml, last change in rev 1.28 --> <refentry id='function.proc-close'> <refnamediv> <refname>proc_close</refname> - <refpurpose> - <function>proc_open</function> で開かれたプロセスを閉じ、そのプロセスのリターンコードを得る - </refpurpose> + <refpurpose><function>proc_open</function> で開かれたプロセスを閉じ、 + そのプロセスの終了コードを返す</refpurpose> </refnamediv> - <refsect1> + + <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>int</type><methodname>proc_close</methodname> <methodparam><type>resource</type><parameter>process</parameter></methodparam> </methodsynopsis> <para> - <function>proc_close</function> は <function>pclose</function> と似ていますが、 - <function>proc_open</function> で開かれたプロセスに対してのみ機能する - という点で異なります。 + <function>proc_close</function> は <function>pclose</function> + と似ていますが、<function>proc_open</function> + で開かれたプロセスに対してのみ機能するという点で異なります。 <function>proc_close</function> は、プロセスが終了するまで待った後で、 終了コードを返します。もし、そのプロセスに対してパイプが開かれていた場合は、 デッドロックを避けるため、<function>fclose</function> 関数で、 @@ -25,6 +27,22 @@ パイプが開いている間、子プロセスは終了できないからです。 </para> </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>process</parameter></term> + <listitem> + <para> + 閉じられる <function>proc_open</function> <type>リソース</type> + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/diff.php/phpdoc-ja/reference/exec/functions/proc-get-status.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc-ja/reference/exec/functions/proc-get-status.xml diff -u phpdoc-ja/reference/exec/functions/proc-get-status.xml:1.4 phpdoc-ja/reference/exec/functions/proc-get-status.xml:1.5 --- phpdoc-ja/reference/exec/functions/proc-get-status.xml:1.4 Sun Jan 9 21:15:12 2005 +++ phpdoc-ja/reference/exec/functions/proc-get-status.xml Mon Jul 25 12:32:29 2005 @@ -1,14 +1,15 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- $Revision: 1.4 $ --> -<!-- EN-Revision: 1.6 Maintainer: hirokawa Status: ready --> +<!-- $Revision: 1.5 $ --> +<!-- EN-Revision: 1.8 Maintainer: hirokawa Status: ready --> +<!-- CREDITS: shimooka --> <refentry id='function.proc-get-status'> <refnamediv> <refname>proc_get_status</refname> - <refpurpose> - <function>proc_open</function> で開かれたプロセスに関する情報を取得する - </refpurpose> + <refpurpose><function>proc_open</function> + で開かれたプロセスに関する情報を取得する</refpurpose> </refnamediv> - <refsect1> + + <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>array</type><methodname>proc_get_status</methodname> @@ -17,8 +18,32 @@ <para> <function>proc_get_status</function> は、<function>proc_open</function> で開かれたプロセスに関する情報を取得します。 - 集められた情報は次のような要素を持つ配列の形で返されます: </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>process</parameter></term> + <listitem> + <para> + 評価される <function>proc_open</function> <type>リソース</type> + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + 成功時は集められた情報の<type>配列</type>、失敗時は &false; 。 + 返される配列は次のような要素を持ちます: + </para> + <para> <informaltable> <tgroup cols="3"> <thead> @@ -28,20 +53,22 @@ <row> <entry>command</entry> <entry><type>string</type></entry> - <entry><function>proc_open</function>に指定されたコマンド文字列</entry> + <entry> + <function>proc_open</function> に指定されたコマンド文字列 + </entry> </row> <row> <entry>pid</entry> <entry><type>int</type></entry> - <entry>プロセス id</entry> - </row> + <entry>process id</entry> + </row> <row> <entry>running</entry> <entry><type>bool</type></entry> <entry> - もしプロセスがまだ動いている場合は、&true; を、すでに終了している場合は - &false; を返します。 - </entry> + もしプロセスがまだ動いている場合は、&true; 、すでに終了している場合は + &false; + </entry> </row> <row> <entry>signaled</entry> @@ -86,8 +113,15 @@ </tbody> </tgroup> </informaltable> + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - <function>proc_open</function>も参照ください。 + <simplelist> + <member><function>proc_open</function></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-ja/reference/exec/functions/shell-exec.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc-ja/reference/exec/functions/shell-exec.xml diff -u phpdoc-ja/reference/exec/functions/shell-exec.xml:1.4 phpdoc-ja/reference/exec/functions/shell-exec.xml:1.5 --- phpdoc-ja/reference/exec/functions/shell-exec.xml:1.4 Sun Jan 9 21:15:12 2005 +++ phpdoc-ja/reference/exec/functions/shell-exec.xml Mon Jul 25 12:32:29 2005 @@ -1,27 +1,55 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.4 $ --> -<!-- EN-Revision: 1.6 Maintainer: hirokawa Status: ready --> +<!-- $Revision: 1.5 $ --> +<!-- EN-Revision: 1.8 Maintainer: hirokawa Status: ready --> +<!-- CREDITS: shimooka --> +<!-- splitted from ./en/functions/exec.xml, last change in rev 1.2 --> <refentry id='function.shell-exec'> <refnamediv> <refname>shell_exec</refname> - <refpurpose> - シェルによりコマンドを実行し、文字列として出力全体を返す - </refpurpose> + <refpurpose>シェルによりコマンドを実行し、文字列として出力全体を返す</refpurpose> </refnamediv> - <refsect1> + + <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>string</type><methodname>shell_exec</methodname> <methodparam><type>string</type><parameter>cmd</parameter></methodparam> </methodsynopsis> <para> - この演算子は、<link - linkend="language.operators.execution">バックティック演算子</link>と同じで - す。 + この関数は <link + linkend="language.operators.execution">バックティック演算子</link> + と等価です。 + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>cmd</parameter></term> + <listitem> + <para> + 実行するコマンド + </para> + </listitem> + </varlistentry> + </variablelist> </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + 実行されたコマンドからの出力 + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> - <title><function>shell_exec</function>の例</title> + <title><function>shell_exec</function> の例</title> <programlisting role="php"> <![CDATA[ <?php @@ -32,12 +60,24 @@ </programlisting> </example> </para> - - &note.sm.disabled; - + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + <note> + <para> + &sm.disabled; + </para> + </note> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - <function>exec</function> および - <function>escapeshellcmd</function>も参照ください。 + <simplelist> + <member><function>exec</function></member> + <member><function>escapeshellcmd</function></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-ja/reference/exec/functions/system.xml?r1=1.6&r2=1.7&ty=u Index: phpdoc-ja/reference/exec/functions/system.xml diff -u phpdoc-ja/reference/exec/functions/system.xml:1.6 phpdoc-ja/reference/exec/functions/system.xml:1.7 --- phpdoc-ja/reference/exec/functions/system.xml:1.6 Sun Jan 9 21:22:26 2005 +++ phpdoc-ja/reference/exec/functions/system.xml Mon Jul 25 12:32:29 2005 @@ -1,12 +1,15 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <!-- EN-Revision: 1.12 Maintainer: hirokawa Status: ready --> +<!-- CREDITS: shimooka --> +<!-- splitted from ./en/functions/exec.xml, last change in rev 1.24 --> <refentry id="function.system"> <refnamediv> <refname>system</refname> - <refpurpose>外部プログラムの実行と表示</refpurpose> + <refpurpose>外部プログラムを実行し、出力を表示する</refpurpose> </refnamediv> - <refsect1> + + <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>string</type><methodname>system</methodname> @@ -14,39 +17,69 @@ <methodparam choice="opt"><type>int</type><parameter role="reference">return_var</parameter></methodparam> </methodsynopsis> <para> - <function>system</function>は、指定した - <parameter>command</parameter>を実行し、結果を出力するC言語の - system関数に似ています。2番目の引数として変数が指定された場合、実 - 行したコマンドのステータスコードが、この変数に書き込まれます。 - </para> - &warn.escapeshell; - &note.exec-bg; - <para> - PHPをサーバモジュールとして実行している場合、 - <function>system</function>のコールにより、各行を出力した後、 - Webサーバの出力バッファが自動的にクリアされます。 + <function>system</function> は、指定した + <parameter>command</parameter> を実行し、結果を出力する C 言語の + system 関数に似ています。 </para> <para> - 成功時にコマンド出力の最後の行が返され、失敗時に&false;が返されます。 + PHP をサーバモジュールとして実行している場合、 + <function>system</function> のコールにより、各行を出力した後、 + Web サーバの出力バッファが自動的にクリアされます。 </para> <para> コマンドを実行し、何の加工もせずに全てのデータをコマンドから直接 返す必要がある場合、<function>passthru</function>関数を使用してください。 </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>command</parameter></term> + <listitem> + <para> + 実行するコマンド + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>return_var</parameter></term> + <listitem> + <para> + 引数<parameter>return_var</parameter>が存在する場合、 + 実行したコマンドのステータスがこの変数に書かれます。 + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + 成功時はコマンド出力の最後の行を返し、失敗時は &false; を返します。 + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> - <title><function>system</function>の例</title> + <title><function>system</function> の例</title> <programlisting role="php"> <![CDATA[ <?php echo '<pre>'; -// Outputs all the result of shellcommand "ls", and returns -// the last output line into $last_line. Stores the return value -// of the shell command in $retval. +// シェルコマンド "ls" の全ての結果を出力し、出力の最後の +// 行を $last_line に格納します。シェルコマンドの戻り値は +// $retval に格納されます。 $last_line = system('ls', $retval); -// Printing additional info +// 追加情報を表示する echo ' </pre> <hr />Last line of the output: ' . $last_line . ' @@ -56,15 +89,27 @@ </programlisting> </example> </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + &warn.escapeshell; + &note.exec-bg; &note.exec-path; &warn.sm.exec; + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - <function>exec</function>, - <function>passthru</function>, <function>popen</function>, - <function>escapeshellcmd</function>, - <function>pcntl_exec</function>, および <link - linkend="language.operators.execution">バックティック演算子</link> - も参照ください。 + <simplelist> + <member><function>exec</function></member> + <member><function>passthru</function></member> + <member><function>popen</function></member> + <member><function>escapeshellcmd</function></member> + <member><function>pcntl_exec</function></member> + <member><link linkend="language.operators.execution">backtick operator</link></member> + </simplelist> </para> </refsect1> </refentry>
« previous php.doc.ja (#1090) next »