mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
adding php tags, CDATAs, CS and corrected a role
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@154163 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
c37e88de08
commit
d193b0cccb
1 changed files with 19 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.30 $ -->
|
||||
<!-- $Revision: 1.31 $ -->
|
||||
<chapter id="features.commandline">
|
||||
<title>Using PHP from the command line</title>
|
||||
<!-- NEW DOCUMENTATION STARTS -->
|
||||
|
@ -226,7 +226,11 @@
|
|||
opening it with
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
$stdin = fopen('php://stdin', 'r');
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</entry>
|
||||
|
@ -238,7 +242,11 @@ $stdin = fopen('php://stdin', 'r');
|
|||
opening it with
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
$stdout = fopen('php://stdout', 'w');
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</entry>
|
||||
|
@ -250,7 +258,11 @@ $stdout = fopen('php://stdout', 'w');
|
|||
opening it with
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
$stderr = fopen('php://stderr', 'w');
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</entry>
|
||||
|
@ -263,7 +275,7 @@ $stderr = fopen('php://stderr', 'w');
|
|||
Given the above, you don't need to open e.g. a stream for
|
||||
<literal>stderr</literal> yourself but simply use the constant instead of
|
||||
the stream resource:
|
||||
<programlisting role="php">
|
||||
<programlisting role="shell">
|
||||
<![CDATA[
|
||||
php -r 'fwrite(STDERR, "stderr\n");'
|
||||
]]>
|
||||
|
@ -283,8 +295,8 @@ php -r 'fwrite(STDERR, "stderr\n");'
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* Our simple test application named test.php*/
|
||||
echo getcwd(), "\n";
|
||||
// Our simple test application named test.php
|
||||
echo getcwd(), "\n";
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
|
@ -476,7 +488,7 @@ array(2) {
|
|||
<![CDATA[
|
||||
#!/usr/bin/php
|
||||
<?php
|
||||
var_dump($argv);
|
||||
var_dump($argv);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
|
@ -1101,7 +1113,9 @@ This is a command line PHP script with one option.
|
|||
<example>
|
||||
<title>Batch file to run a command line PHP script (script.bat)</title>
|
||||
<programlisting role="shell">
|
||||
<![CDATA[
|
||||
@c:\php\cli\php.exe script.php %1 %2 %3 %4
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
|
|
Loading…
Reference in a new issue