cvs: phpdoc /ja/appendices commandline.xml
| From: | Masaki Fujimoto | Date: | Mon, 10 Dec 2001 15:13:42 +0000 |
| Subject: | cvs: phpdoc /ja/appendices commandline.xml | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969339601@lists.php.net to get a copy of this message | ||
fujimoto Mon Dec 10 10:13:42 2001 EDT
Modified files:
/phpdoc/ja/appendices commandline.xml
Log:
updated translation (up to 1.6).
Index: phpdoc/ja/appendices/commandline.xml
diff -u phpdoc/ja/appendices/commandline.xml:1.2 phpdoc/ja/appendices/commandline.xml:1.3
--- phpdoc/ja/appendices/commandline.xml:1.2 Sat Nov 10 16:50:05 2001
+++ phpdoc/ja/appendices/commandline.xml Mon Dec 10 10:13:42 2001
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<!--
TODO:
@@ -36,7 +36,7 @@
<literal>-h</literal>
ãªãã·ã§ã³ã使ç¨ãããã¨ã«ãããå®éã®ãªã¹ã
ã¨ãã®ç°¡åãªèª¬æãå¾ããã¨ãå¯è½ã§ãã<literal>php
-h</literal> ã®
åºåã¯ã以ä¸ã®ããã«ãªãã¾ãã
- <programlisting>
+ <screen>
<![CDATA[
Usage: php [-q] [-h] [-s [-v] [-i] [-f <file>] | {<file> [args...]}
-q Quiet-mode. Suppress HTTP Header output.
@@ -53,7 +53,7 @@
-i PHP information
-h This help
]]>
- </programlisting>
+ </screen>
</para>
<para>
以ä¸ã«æãéè¦ãªã³ãã³ãã©ã¤ã³ãªãã·ã§ã³ã®ããã¤ãã«ã¤ãã¦è©³ç´°ãªè§£
@@ -148,17 +148,17 @@
</table>
</para>
<para>
- The PHP executable can be used to run PHP scripts absolutely
- independent from the web server. If you are on a Unix system,
- you should add a special first line to your PHP script, and
- make it executable, so the system will know, what program
- should run the script. On a Windows platform you can associate
- <literal>php.exe -q</literal> with the double click option of
- the <literal>.php</literal> files, or you can make a batch file
- to run the script through PHP. The first line added to the
- script to work on Unix won't hurt on Windows, so you can write
- cross platform programs this way. A simple example of writing
- a command line PHP program can be found below.
+
PHPã®å®è¡å½¢å¼ã使ãã°PHPãã¹ã¯ãªãããã¦ã§ããµã¼ãããå®å
¨ã«
+
ç¬ç«ããã¦å®è¡ãããã¨ãåºæ¥ã¾ããUnixã·ã¹ãã ä¸ã§ã¯ãPHP
+
ã¹ã¯ãªããã®å
é ã«ç¹å¥ãª1è¡ã追å ãããã¨ã§ããã®ã¹ã¯ãªããã
+
å®è¡ããã®ã«å¿
è¦ãªããã°ã©ã ãã·ã¹ãã ã«ç¥ããããã¨ãã§ããã®ã§
+
ãã®ã¹ã¯ãªããèªä½ãå®è¡å¯è½å½¢å¼ã¨ãããã¨ãåºæ¥ã¾ããWindows
+ ã·ã¹ãã ä¸ã§ã¯ã<literal>php.exe
-q</literal>ã<literal>.php
+
</literal>ãã¡ã¤ã«ã«é¢é£ä»ããããPHPã使ã£ã¦ã¹ã¯ãªãããå®è¡ãã
+
ããããã¡ã¤ã«ãæ¸ããã¨ãåºæ¥ã¾ããUnixã§ã®å®è¡ã®ããã«ä»å ããã
+
æåã®1è¡ã¯Windowsä¸ã§ã®å®è¡æã«ãåé¡ã¨ãªããã¨ã¯ããã¾ããã®ã§
+
ã¯ãã¹ãã©ãããã©ã¼ã ãªã¹ã¯ãªãããæ¸ããã¨ãåºæ¥ã¾ããã³ãã³ã
+
ã©ã¤ã³ç¨PHPããã°ã©ã ã®åç´ãªä¾ã¯ä»¥ä¸ã®ãããªãã®ã§ãã
</para>
<example>
<title>ã³ãã³ãã©ã¤ã³å®è¡ç¨ã«ä½æãããã¹ã¯ãªãã(script.php)</title>
@@ -187,45 +187,42 @@
</programlisting>
</example>
<para>
- In the script above, we used the special first line to indicate,
- that this file should be run by PHP and should not print out HTTP
- headers. There are two variables you can use while writing command
- line applications with PHP: <varname>$argc</varname> and
- <varname>$argv</varname>. The first is the number of arguments plus
- one (the name of the script running). The second is an array
- containing the arguments, starting with the script name as number
- zero (<varname>$argv[0]</varname>).
- </para>
- <para>
- In the program above we checked if there are less or more than one
- arguments. Also if the argument was <literal>--help</literal>,
- <literal>-help</literal>, <literal>-h</literal> or
<literal>-?</literal>,
- we printed out the help message, printng the script name dynamically.
- If we received some other argument we echoed that out.
- </para>
- <para>
- If you would like to run the above script on Unix, you need to
- make it executable, and simply call it as
- <literal>script.php echothis</literal> or
- <literal>script.php -h</literal>. On Windows, you can make a
- batch file for this task:
+
ä¸è¨ã®ã¹ã¯ãªããã§ã¯ãã¡ã¤ã«ãPHPã«ãã£ã¦å®è¡ãããã¾ãHTTPãããã
+
åºåããªããã¨ã示ãç¹å¥ãª1è¡ç®ã使ç¨ãã¦ãã¾ããPHPã®ã³ãã³ãã©ã¤ã³ç
+
ã¢ããªã±ã¼ã·ã§ã³ãæ¸ãã¨ãã以ä¸ã®2ã¤ã®å¤æ°ã使ç¨ãããã¨ãåºæ¥ã¾ãï¼
+
<varname>$argc</varname>ã¨<varname>$argv</varname>ã§ãã1çªç®ã®å¤æ°ã¯
+
弿°ã®æ°ã«1ãè¶³ããæ°(å®è¡ä¸ã®ã¹ã¯ãªããå)ã§ãã2çªç®ã®å¤æ°ã¯å¼æ°ã
+
æ ¼ç´ããé
åã§ããé
åã¯ã¹ã¯ãªããåãæ ¼ç´ãã0(<varname>$argv[0]
+ </varname>)ããå§ã¾ãã¾ãã
+ </para>
+ <para>
+
ä¸è¨ã®ããã°ã©ã ã¯ã弿°ã®æ°ã1æªæºã1ããå¤ããã©ããããã§ãã¯
+
ãã¦ãã¾ããã¾ãããã弿°ã<literal>--help</literal>,
<literal>-help
+ </literal>,
<literal>-h</literal>ãããã¯<literal>--help</literal>
+
ã ã£ããåçã«ã¹ã¯ãªããåã表示ãããã«ããåºåãã¾ããããä»ã®
+
弿°ãåãåã£ããããã表示ãã¾ãã
+ </para>
+ <para>
+
ããä¸è¨ã®ã¹ã¯ãªãããUnixã§å®è¡ãããªãããã¡ã¤ã«ã«å®è¡æ¨©éãä¸ãã
+ åç´ã«
+ <literal>script.php
echothis</literal>ãããã¯<literal>script.php -h
+
</literal>ã¨ããããã«å®è¡ãã¾ããWindowsã§ã¯ãããããã¡ã¤ã«ãæ¸ã
+ ãã¨ã§åæ§ã®ãã¨ãè¡ãã¾ãï¼
</para>
<example>
<title>
ã³ãã³ãã©ã¤ã³çPHPã¹ã¯ãªãããå®è¡ããããããã¡ã¤ã«(script.bat)
</title>
- <programlisting>
+ <programlisting role="winbat">
@c:\php\php.exe -q script.php %1 %2 %3 %4
</programlisting>
</example>
<para>
- Assuming, you named the above program as
- <filename>script.php</filename>, and you have your
- <filename>php.exe</filename> in
- <filename>c:\php\php.exe</filename> this batch file
- will run it for you with your added options:
- <literal>script.bat echothis</literal> or
- <literal>script.bat -h</literal>.
+
ä¸è¨ã®ããã°ã©ã ã<filename>script.php</filename>ã¨ããååã«ããã¨ãã¦ã
+
ã¾ã<filename>php.exe</filename>ã<filename>c:\php\php.exe</filename>ã«
+
ããã¨ããã¨ãã®ããããã¡ã¤ã«ã¯<literal>script.bat
echothis</literal>
+ ãããã¯<literal>script.bat
-h</literal>ã¨ãã£ããªãã·ã§ã³ã追å ãã¦
+ å®è¡ãããã¨ãåºæ¥ã¾ãã
</para>
</appendix>