hirokawa Sun Mar 18 08:36:46 2001 EDT Modified files: /phpdoc/ja/chapters install.xml /phpdoc/ja/functions array.xml datetime.xml filesystem.xml info.xml misc.xml nis.xml session.xml var.xml xslt.xml /phpdoc/ja/language control-structures.xml variables.xml Log: update translation.
Index: phpdoc/ja/chapters/install.xml diff -u phpdoc/ja/chapters/install.xml:1.27 phpdoc/ja/chapters/install.xml:1.28 --- phpdoc/ja/chapters/install.xml:1.27 Fri Mar 9 07:33:03 2001 +++ phpdoc/ja/chapters/install.xml Sun Mar 18 08:36:45 2001 @@ -338,6 +338,49 @@ </sect2> </sect1> + <sect1 id="install.openbsd"> + <title>Unix/OpenBSD インストール</title> + <para> + 本節では、PHPを <ulink url="&url.openbsd;">OpenBSD</ulink> にイン + +ストールする場合に固有の注意事項とヒントについて説明します。 + </para> + <sect2 id="install.openbsd.ports"> + <title>ports を使用する</title> + <simpara> + +この方法は維持管理する人により最新のパッチやセキュリティ上の修正 + +が適用されており、PHPをOpenBSDにインストールする際に推奨される方 + 法です。この方法を使用するには、<ulink url="&url.openbsd.ports;"> + +最新のportsツリー</ulink>を手に入れているかどうかを確認して下さい。 + 続いて、インストールしたいものを見つけ、<command>make + +install</command>コマンドを実行します。以下にこれを実行する際の例 + を示します。 + </simpara> + <example id="install.openbsd.ports.example"> + <title>OpenBSD ports によるインストール例</title> + <programlisting> +$ cd /usr/ports/www/php4 +$ make show VARNAME=FLAVORS + (choose which flavors you want from the list) +$ make install FLAVOR="imap gettext ldap mysql gd pdflib" +$ php4-enable + </programlisting> + </example> + </sect2> + <sect2 id="install.openbsd.packages"> + <title>パッケージの使用</title> + <simpara> + <ulink url="&url.openbsd;">OpenBSD</ulink> のバージョン毎にコンパ + +イル済のパッケージが入手可能です。これらは、OSにインストールされ + +たApacheのバージョンに自動的に合わせられます。しかし、このポート + には(<emphasis>flavors</emphasis>と呼ばれる)多くのオプションがあ + るため、ports +ツリーを使用してソースからコンパイルする方が簡単で + +あると思うかもしれません。利用可能なパッケージに関するより詳細な + 情報についてはマニュアル <ulink + url="&url.openbsd.packages;">packages(7)</ulink> を参照下さい。 + </simpara> + </sect2> + </sect1> + <sect1 id="install.macosx"> <title>Mac OS X へのインストール</title> <para> Index: phpdoc/ja/functions/array.xml diff -u phpdoc/ja/functions/array.xml:1.21 phpdoc/ja/functions/array.xml:1.22 --- phpdoc/ja/functions/array.xml:1.21 Fri Mar 9 07:33:03 2001 +++ phpdoc/ja/functions/array.xml Sun Mar 18 08:36:45 2001 @@ -591,9 +591,11 @@ </funcprototype> </funcsynopsis> <para> - <function>array_pop</function>は配列<parameter>array</parameter>の - 最後の値を取り出して返します。配列<parameter>array</parameter>は、 - 要素一つ分短くなります。 + <function>array_pop</function>は配列<parameter>array</parameter> + +の最後の値を取り出して返します。配列<parameter>array</parameter> + は、要素一つ分短くなります。<parameter>array</parameter> +が空の場 + 合、(または、配列でない場合、)<varname>NULL</varname> +が返されま + す。 </para> <para> <example> @@ -783,8 +785,10 @@ </funcsynopsis> <para> <function>array_shift</function>は、<parameter>array</parameter> - の最初の値を取り出して返?~す。配列 <parameter>array</parameter>は、 - 要素一つ分だけ短くなり、全ての要素は前にずれます。 + の最初の値を取り出して返します。配列 +<parameter>array</parameter> + は、要素一つ分だけ短くなり、全ての要素は前にずれます。 + <parameter>array</parameter> が空の場合(または配列でない場合)、 + <varname>NULL</varname> が返されます。 </para> <para> <example> Index: phpdoc/ja/functions/datetime.xml diff -u phpdoc/ja/functions/datetime.xml:1.20 phpdoc/ja/functions/datetime.xml:1.21 --- phpdoc/ja/functions/datetime.xml:1.20 Thu Mar 15 04:22:10 2001 +++ phpdoc/ja/functions/datetime.xml Sun Mar 18 08:36:45 2001 @@ -153,7 +153,9 @@ </listitem> <listitem> <simpara> - r - RFC 822 フォーマットされた日付。すなわち "Thu, 21 Dec 2000 16:01:07 +0200" + r - RFC 822 フォーマットされた日付。すなわち "Thu, 21 Dec 2000 + 16:01:07 +0200" + (PHP 4.0.4で追加) </simpara> </listitem> <listitem> @@ -621,7 +623,7 @@ <programlisting role="php"> function getmicrotime(){ list($sec, $usec) = explode(" ",microtime()); - return ($sec + $usec); + return ((float)$sec + (float)$usec); } $time_start = getmicrotime(); Index: phpdoc/ja/functions/filesystem.xml diff -u phpdoc/ja/functions/filesystem.xml:1.27 phpdoc/ja/functions/filesystem.xml:1.28 --- phpdoc/ja/functions/filesystem.xml:1.27 Fri Mar 9 07:33:03 2001 +++ phpdoc/ja/functions/filesystem.xml Sun Mar 18 08:36:45 2001 @@ -1573,6 +1573,14 @@ 構成オプションは無視され、<parameter>string</parameter>からの スラッシュ文字の取り除きは行われないことに注意して下さい。 </simpara> + <note> + <para> + +(Windowsのように)バイナリとテキストファイルの形式が異なるシステ + ムにおいては、ファイルをオープンする際に + <function>fopen</function>の mode パラメータに 'b' を指定する必 + 要があります。 + </para> + </note> <simpara> <function>fread</function>, <function>fopen</function>, <function>fsockopen</function>, <function>popen</function>, Index: phpdoc/ja/functions/info.xml diff -u phpdoc/ja/functions/info.xml:1.21 phpdoc/ja/functions/info.xml:1.22 --- phpdoc/ja/functions/info.xml:1.21 Fri Mar 9 07:33:03 2001 +++ phpdoc/ja/functions/info.xml Sun Mar 18 08:36:45 2001 @@ -1089,8 +1089,8 @@ <refnamediv> <refname>get_required_files</refname> <refpurpose> - あるスクリプトでrequire_once()でロードされたファイルの名前を配列 - として返す + +あるスクリプトでrequire_once()またはincluded_once()でロードされた + ファイルの名前を配列として返す </refpurpose> </refnamediv> <refsect1> @@ -1102,62 +1102,26 @@ </funcprototype> </funcsynopsis> <para> - この関数は、<function>require_once</function>によりスクリプÈにロー - ドされた全てのファイルの名前を連想配列として返します。 - <function>require_once</function>で使用した際と同様に拡張子 - ".php"を除いたファイル名が配列の添字となります。 + この関数は、<function>require_once</function>または + <function>include_once</function> によりスクリプトにロードされた + 全てのファイルの名前を配列として返します。 + </para> + <note> + <para> + PHP 4.0.1pl2においてこの関数は、<varname>required_once</varname> + +で読み込まれるファイルの名前が拡張子".php"で終ることを + +仮定しており、他の拡張子では動作しません。また、このバージョンで + は返される配列は連想配列ですあり、この関数は + <function>get_included_files</function> へのエイリアスではありま + せんでした。 + </para> + <para> + PHP 4.0.4 では、この関数は + <function>get_included_files</function> へのエイリアスです。 + </para> + </note> </para> <para> - <example> - <title>読み込まれたファイルを出力する</title> - <programlisting role="php"> -<?php - -require_once ("local.php"); -require_once ("../inc/global.php"); - -for ($i=1; $i<5; $i++) - include "util".$i."php"; - -echo "Required_once files\n"; -print_r (get_required_files()); - -echo "Included_once files\n"; -print_r (get_included_files()); - </programlisting> - </example> - 上記の例の出力は次のようになります。 - <informalexample> - <programlisting> -Required_once files -Array -( - [local] => local.php - [../inc/global] => /full/path/to/inc/global.php -) - -Included_once files -Array -( - [util1] => util1.php - [util2] => util2.php - [util3] => util3.php - [util4] => util4.php -) - </programlisting> - </informalexample> - </para> - <para> - <note> - <para> - PHP 4.0.1pl2においてこの関数は、 - <varname>required_once</varname>で読み込まれるファイルの名前が - 拡張子".php"で終ることを仮定しており、他の拡張子では - 動作しません。 - </para> - </note> - </para> - <para> <function>require_once</function>、 <function>include_once</function>、 <function>get_included_files</function>も参照下さい。 @@ -1181,21 +1145,52 @@ </funcprototype> </funcsynopsis> <para> - この関数は、<function>include_once</function>によりスクリプトにロー - ドされた全てのファイルの名前を連想配列として返します。 - <function>include_once</function>で使用した際と同様に拡張子 - ".php"を除いたファイル名が配列の添字となります。 + この関数は、<function>require_once</function>または + <function>include_once</function> によりスクリプトにロードされた + 全てのファイルの名前を配列として返します。 </para> <para> - <note> - <para> - PHP 4.0.1pl2においてこの関数は、 - <varname>include_once</varname>で読み込まれるファイルの名前が - 拡張子".php"で終ることを仮定しており、他の拡張子では - 動作しません。 - </para> - </note> + 以下に例を示します。 + <example> + <title>require および include +で読み込まれたファイルを出力する</title> + <programlisting role="php"> +<?php + +require_once ("local.php"); +require_once ("../inc/global.php"); + +for ($i=1; $i<5; $i++) + include "util".$i."php"; + + echo "Required_once/Included_once files\n"; + print_r (get_required_files()); + </programlisting> + </example> + この例の出力は以下のようになります。 + <informalexample> + <programlisting> +Required_once/Included_once files +Array +( + [0] => local.php + [1] => /full/path/to/inc/global.php + [2] => util1.php + [3] => util2.php + [4] => util3.php + [5] => util4.php +) + </programlisting> + </informalexample> </para> + <note> + <para> + PHP 4.0.1pl2において、この関数は、 + <varname>include_once</varname> で読み込まれるファイルの名前が + +拡張子".php"で終ることを仮定しており、他の拡張子では + +動作しませんでした。また、このバージョンでは返される配列は連想 + +配列であり、includeされたファイルのみが一覧に含まれていました。 + </para> + </note> <para> <function>require_once</function>、 <function>include_once</function>、 Index: phpdoc/ja/functions/misc.xml diff -u phpdoc/ja/functions/misc.xml:1.16 phpdoc/ja/functions/misc.xml:1.17 --- phpdoc/ja/functions/misc.xml:1.16 Sat Mar 10 21:56:43 2001 +++ phpdoc/ja/functions/misc.xml Sun Mar 18 08:36:45 2001 @@ -590,7 +590,7 @@ <title>説明</title> <funcsynopsis> <funcprototype> - <funcdef>void <function>highlight_string</function></funcdef> + <funcdef>boolean <function>highlight_string</function></funcdef> <paramdef>string <parameter>str</parameter></paramdef> </funcprototype> </funcsynopsis> Index: phpdoc/ja/functions/nis.xml diff -u phpdoc/ja/functions/nis.xml:1.7 phpdoc/ja/functions/nis.xml:1.8 --- phpdoc/ja/functions/nis.xml:1.7 Sun Nov 19 15:00:22 2000 +++ phpdoc/ja/functions/nis.xml Sun Mar 18 08:36:45 2001 @@ -94,7 +94,8 @@ $number = yp_order($domain,$mapname); if(!$number) { - echo yp_errno() . ": " . yp_err_string(); + echo "エントリが見つかりません\n"; + <!-- echo yp_errno() . ": " . yp_err_string(); --> } echo "このマップの呼出番号は、" . $order . "です。"; Index: phpdoc/ja/functions/session.xml diff -u phpdoc/ja/functions/session.xml:1.20 phpdoc/ja/functions/session.xml:1.21 --- phpdoc/ja/functions/session.xml:1.20 Sat Feb 3 17:05:22 2001 +++ phpdoc/ja/functions/session.xml Sun Mar 18 08:36:45 2001 @@ -45,7 +45,7 @@ <para> PHP 4.0.3以降、<link linkend="ini.track-vars"><literal>track_vars</literal></link>は常 - にオンとなりました。 + に on となりました。 </para> </note> <para> @@ -142,9 +142,9 @@ こんにちは、あなたがこのページに来たのは<?php echo $count; ?> times.<p> 回目ですね。 -<? +<php? # ユーザーがクッキーを使用不可としている場合は、セッションIDを -# 保存する必要があります。 +# 保持するために <?=SID?> が必要です。 ?> 続けるには、 @@ -157,6 +157,13 @@ PHPのコンパイル時に <literal>--enable-trans-sid</literal>を指定し た場合には、<literal><?=SID?></literal> は必要ありません。 </para> + <note> + <para> + +相対URLでないものは、外部サイトを指していると仮定されSIDが追加 + +されません。これは、SIDを異なったサーバにもらすことはセキュリティ + 上のリスクとなるためです。 + </para> + </note> <para> セッション情報をデータベースに保存する機能か他の保存法を実装するに は、一連のユーザレベルの保存関数を作成し、 @@ -234,7 +241,7 @@ <literal>session.referer_check</literal> には、HTTP Referer に おいて確認を行う文字列を指定します。Refererがクライアントにより 送信されており、かつ、指定した文字列が見付からない場合、埋め込 - まれたセッションIDは無効となります。 + +まれたセッションIDは無効となります。デフォルトは空の文字列です。 </simpara> </listitem> <listitem> @@ -310,13 +317,16 @@ </funcsynopsis> <simpara> <function>session_start</function> は、セッションを作成します。 - (もしくは、GET変数またはクッキーにより渡されたセッションIDセッションに - 基づき現在のセッションを復帰します)</simpara> + +(もしくは、GET変数またはクッキーにより渡されたセッションIDセッショ + ンに基づき現在のセッションを復帰します) + </simpara> <simpara> - この関数は常に true を返します。</simpara> + この関数は常に true を返します。 + </simpara> <note> <para> - この関数は、PHP 4.0 で追加されました。</para> + この関数は、PHP 4.0 で追加されました。 + </para> </note> </refsect1> </refentry> Index: phpdoc/ja/functions/var.xml diff -u phpdoc/ja/functions/var.xml:1.23 phpdoc/ja/functions/var.xml:1.24 --- phpdoc/ja/functions/var.xml:1.23 Fri Mar 9 07:33:04 2001 +++ phpdoc/ja/functions/var.xml Sun Mar 18 08:36:45 2001 @@ -894,7 +894,7 @@ <title>説明</title> <funcsynopsis> <funcprototype> - <funcdef>int <function>unset</function></funcdef> + <funcdef>void <function>unset</function></funcdef> <paramdef>mixed <parameter>var</parameter></paramdef> <paramdef>mixed <parameter> @@ -1021,6 +1021,11 @@ </programlisting> </informalexample> </para> + <note> + <para> + <function>unset</function> は言語の一部です。 + </para> + </note> <para> <function>isset</function>、<function>empty</function>も参照下さい。 </para> Index: phpdoc/ja/functions/xslt.xml diff -u phpdoc/ja/functions/xslt.xml:1.5 phpdoc/ja/functions/xslt.xml:1.6 --- phpdoc/ja/functions/xslt.xml:1.5 Thu Jan 4 22:29:05 2001 +++ phpdoc/ja/functions/xslt.xml Sun Mar 18 08:36:45 2001 @@ -352,60 +352,54 @@ <programlisting role="php"> <?php -$xslData = ' -<xsl:stylesheet +$xslData = '<xsl:stylesheet version="1.0" - xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> + xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> -<xsl:template match="article"> - <table border="1" cellpadding="2" cellspacing="1"> - <tr> - <td width="20%"> - - </title> - <td width="80%"> - <h2><xsl:value-of select="title"></h2> - <h3><xsl:value-of select="author"></h3> - <br> +<xsl:template match="article"> + <table border="1" cellpadding="2" cellspacing="1"> + <tr> + <td width="20%"> + &#160; + </td> + <td width="80%"> + <h2><xsl:value-of select="title"/></h2> + <h3><xsl:value-of select="author"/></h3> + <br/> - <xsl:value-of select="body"> - </td> - </tr> - </table> -</xsl:template> + <xsl:copy-of select="p"/> + </td> + </tr> + </table> +</xsl:template> -</xsl:stylesheet>'; +</xsl:stylesheet>'; -$xmlData = ' -<?xml version="1.0"?> -<article> - <title>Learning German</title> - <author>Sterling Hughes</author> - <body> - Essential phrases: - <br> - <br> - Komme sie mir sagen, woe die toilette es?<br> - Eine grande beer bitte!<br> - Noch einem bitte.<br> - </body> -</article>'; +$xmlData = '<?xml version="1.0"?> +<article> + <title>Learning German</title> + <author>Sterling Hughes</author> + <p> + Essential phrases: + <br/> + K&#246;nnen Sie mir sagen, wo die Toilette ist?<br/> + Ein grosses Bier, bitte!<br/> + Noch eins, bitte.<br/> + </p> +</article>'; -if (xslt_process($xslData, $xmlData, $result)) -{ +if (xslt_process($xslData, $xmlData, $result)) { echo "Here is the brilliant in-depth article on learning"; echo " German: "; echo "<br>\n<br>"; echo $result; -} -else -{ +} else { echo "There was an error that occurred in the XSL transformation...\n"; echo "\tError number: " . xslt_errno() . "\n"; echo "\tError string: " . xslt_error() . "\n"; exit; } -?> +?> </programlisting> </example> </para> Index: phpdoc/ja/language/control-structures.xml diff -u phpdoc/ja/language/control-structures.xml:1.15 phpdoc/ja/language/control-structures.xml:1.16 --- phpdoc/ja/language/control-structures.xml:1.15 Thu Mar 1 07:24:45 2001 +++ phpdoc/ja/language/control-structures.xml Sun Mar 18 08:36:45 2001 @@ -422,7 +422,7 @@ <informalexample> <programlisting> foreach(array_expression as $value) statement -foreach(array_expression as $key => $value) statement +foreach(array_expression as $key => $value) statement </programlisting> </informalexample> </para> @@ -477,7 +477,7 @@ echo "Key: $key; Value: $value<br>\n"; } -foreach( $arr as $key => $value ) { +foreach( $arr as $key => $value ) { echo "Key: $key; Value: $value<br>\n"; } </programlisting> @@ -501,19 +501,19 @@ $i = 0; /* 説明用 */ foreach($a as $v) { - print "\$a[$i] => $k.\n"; + print "\$a[$i] => $v.\n"; } /* foreachの例3: キーと値 */ $a = array( - "one" => 1, - "two" => 2, - "three" => 3, - "seventeen" => 17 + "one" => 1, + "two" => 2, + "three" => 3, + "seventeen" => 17 ); -foreach($a as $k => $v) { - print "\$a[$k] => $v.\n"; +foreach($a as $k => $v) { + print "\$a[$k] => $v.\n"; } </programlisting> </informalexample> Index: phpdoc/ja/language/variables.xml diff -u phpdoc/ja/language/variables.xml:1.9 phpdoc/ja/language/variables.xml:1.10 --- phpdoc/ja/language/variables.xml:1.9 Mon Feb 26 07:40:19 2001 +++ phpdoc/ja/language/variables.xml Sun Mar 18 08:36:45 2001 @@ -239,11 +239,12 @@ </varlistentry> <varlistentry> - <term>HTTP_ENCODING</term> + <term>HTTP_ACCEPT_ENCODING</term> <listitem> <simpara> - 現在のリクエストにおける<literal>Accept-Encoding:</literal>ヘッダーの内容。 - ただし、該当するヘッダーがある場合のみ定義されます。例えば、'gzip'。 + 現在のリクエストにおける<literal>Accept-Encoding:</literal>ヘッ + +ダーの内容。ただし、該当するヘッダーがある場合のみ定義されま + す。例えば、'gzip'。 </simpara> </listitem> </varlistentry>