tal Thu Feb 28 14:46:18 2002 EDT
Modified files:
/phpdoc/he/appendices commandline.xml
Log:
finished
Index: phpdoc/he/appendices/commandline.xml
diff -u phpdoc/he/appendices/commandline.xml:1.1
phpdoc/he/appendices/commandline.xml:1.2
--- phpdoc/he/appendices/commandline.xml:1.1 Wed Feb 27 10:13:27 2002
+++ phpdoc/he/appendices/commandline.xml Thu Feb 28 14:46:16 2002
@@ -120,37 +120,32 @@
<row>
<entry>-l</entry>
<entry>
- ����� ������ ��������. ������ �� �� ������ �� ������ q-.
- ������ �� �� ���� ������ �������. ��� ����� �� ������ �������,
- �� ������ ������� f-.
+ ����� ������ �������� ����� �����. ������ �� ��
+ ������ �� ������ q-. ������ �� �� ���� ������ �������.
+ ��� ����� �� ������ �������, �� ������ ������� f-.
</entry>
</row>
<row>
<entry>-m</entry>
<entry>
- Using this option, PHP prints out the built in
- (and loaded) PHP and Zend modules, the PHP
- and Zend version numbers, and a short Zend
- copyright notice.
+ ���� ���� ������� ������� �������� �������
+ �� PHP �-Zend, ������ PHP �-Zend
+ ������ ������ ������ ���� �� Zend.
</entry>
</row>
<row>
<entry>-i</entry>
<entry>
- This command line option calls
- <function>phpinfo</function>, and prints
- out the results. If PHP is not working well,
- it is advisable to make a <literal>php -i</literal>
- and see if any error messages are printed out
- before or in place of the information tables.
+ ������ �� ����� �������� <function>phpinfo</function> ������ �� ����.
+ �� PHP �� ����� ��� �����, ����� ����� ���� �� ������ ��
+ ������ �� �� ������ ����� ���� �� ����� ����.
</entry>
</row>
<row>
<entry>-h</entry>
<entry>
- With this option, you can get information about
- the actual list of command line options and some
- one line descriptions about what they do.
+ ������ �� ����� �� ����� ��������
+ ���� ������ ����� ��� �� �� ���.
</entry>
</row>
</tbody>
@@ -158,20 +153,18 @@
</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 ����� ���� �� ��� ����� ��������
+ ��� �� ��� �� ��� �-Web. ������� UNIX, �� ������ ���� ������
+ ������ �������� �-PHP ������ ���� ���� ����, �� �������
+ ��� ����� ���� ����� ����� ����� �� �������.
+ �� ������ ������ ���� ����� �� <literal>php.exe -q</literal> �� ���
+ ����� ����� �� ���� <literal>.php</literal>, ���� �� ����� ���� ����� (Batch)
+ ����� ����� �� ���������. ������ ������, PHP ����� �� ����� �������
+ ��� ������ ������� UNIX, �� ����� ����� ����� �������� ����-���������.
+ ���� ����� ������ ������ ���� ����� �-PHP.
</para>
<example>
- <title>Script intended to be run from command line (script.php)</title>
+ <title>������ ������ ���� ����� ������ (script.php)</title>
<programlisting role="php">
<![CDATA[
#!/usr/bin/php -q
@@ -198,48 +191,39 @@
</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, printing 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.
+ ���� ��� ������ ����� ������ ��� ��� ����� ������
+ ���� ����� �-PHP: <varname>$argc</varname> �-<varname>$argv</varname>.
+ ������ ��� ���� ���������� ���� ��� (��� �� ������� ������).
+ ���� ��� ���� ����� �� ����������, ���� ������� ��� ��� 0
+(<varname>$argv[0]</varname>).
+ </para>
+ <para>
+ ������� ��"� ����� ��� �� ���� ���� �� ���� ��� ���������.
+ �����, �� �������� ��� <literal>--help</literal>,
+<literal>-help</literal>,<literal>-h</literal> �� <literal>-?</literal>,
+ ������ ����� ����, ������ �� �� ������� ����� �����.
+ �� �������� ��� ���� �� ������ ����.
+ </para>
+ <para>
+ �� ��� ����� �� ������� �� ����� UNIX, �� ����� ����
+ ���-���� ������ �� ��: <literal>script.php echothis</literal> ��
+<literal>script.php -h</literal>.
+ �� ����� ������, ���� ����� ���� ����� ����� ��:
</para>
<example>
- <title>Batch file to run a command line PHP script (script.bat)</title>
+ <title>���� ����� ����� ������ ���� ����� �-PHP (script.bat)</title>
<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>
<para>
- See also the <link linkend="ref.readline">Readline</link>
- extension documentation for more functions you can use
- to enhance your command line applications in PHP.
+ ����� �� ����� ������ �������� ��������� ��������
+ ���� �����, ���� ����� �� ������ �� ����� <link
+linkend="ref.readline">Readline</link>.
</para>
</appendix>