helly Sat Feb 8 10:29:35 2003 EDT Modified files: /php4/sapi/cli php.1 Log: Style corrections See also: Stig's intro Version info Index: php4/sapi/cli/php.1 diff -u php4/sapi/cli/php.1:1.4 php4/sapi/cli/php.1:1.5 --- php4/sapi/cli/php.1:1.4 Fri Feb 7 17:12:02 2003 +++ php4/sapi/cli/php.1 Sat Feb 8 10:29:35 2003 @@ -14,9 +14,9 @@ ./" | Author: Marcus Boerger <[EMAIL PROTECTED]> | ./" +----------------------------------------------------------------------+ ./" -./" $Id: php.1,v 1.4 2003/02/07 22:12:02 helly Exp $ +./" $Id: php.1,v 1.5 2003/02/08 15:29:35 helly Exp $ ./" -.TH PHP 1 +.TH PHP 1 "Feb 2003" "The PHP Group" "Scripting Language" .SH NAME .TP 15 .B php @@ -24,49 +24,41 @@ .SH SYNOPSIS .B php [options] [ -.B \-f -] +.B \-f ] .IR file [[\-\-] -.IR args -] +.IR args.\|.\|. ] .LP .B php [options] .B \-r .IR code [[\-\-] -.IR args -] +.IR args.\|.\|. ] .LP .B php [options] [\-B -.IR code -] +.IR code ] .B \-R .IR code [\-E -.IR code -] [[\-\-] -.IR args -] +.IR code ] +[[\-\-] +.IR args.\|.\|. ] .LP .B php [options] [\-B -.IR code -] +.IR code ] .B \-F .IR file [\-E -.IR code -] [[\-\-] -.IR args -] +.IR code ] +[[\-\-] +.IR args.\|.\|. ] .LP .B php [options] \-\- [ -.IR args -] +.IR args.\|.\|. ] .LP .SH DESCRIPTION .B PHP @@ -107,7 +99,7 @@ .B \-a Run interactively .TP -.B \-c path|file +.B \-c \fIpath\fP|\fIfile\fP Look for .B php.ini file in the directory @@ -120,7 +112,7 @@ .B php.ini file will be used .TP -.B \-d foo[=bar] +.B \-d \fIfoo\fP[=\fIbar\fP] Define INI entry .IR foo with value @@ -129,7 +121,7 @@ .B \-e Generate extended information for debugger/profiler .TP -.B \-f file +.B \-f \fIfile\fP Parse and execute .IR file .TP @@ -145,28 +137,28 @@ .B \-m Show compiled in modules .TP -.B \-r code +.B \-r \fIcode\fP Run PHP .IR code without using script tags .B '<?..?>' .TP -.B \-B code +.B \-B \fIcode\fP Run PHP .IR code before processing input lines .TP -.B \-R code +.B \-R \fIcode\fP Run PHP .IR code for every input line .TP -.B \-F file +.B \-F \fIfile\fP Parse and execute .IR file for every input line .TP -.B \-E code +.B \-E \fIcode\fP Run PHP .IR code after processing all input lines @@ -180,14 +172,14 @@ .B \-w Display source with stripped comments and whitespace .TP -.B \-z file +.B \-z \fIfile\fP Load Zend extension .IR file .TP -.IR args +.IR args.\|.\|. Arguments passed to script. Use .B '\-\-' -.IR args +.IR args when first argument starts with .B '\-' or script is read from stdin @@ -202,31 +194,34 @@ cannot not be found. .SH EXAMPLES .TP 5 -php \-r 'echo "Hello World\\n";' +\fIphp -r 'echo "Hello World\\n";'\fP This command simply writes the text "Hello World" to stabdard out. .TP -php \-r 'print_r(gd_info());' +\fIphp \-r 'print_r(gd_info());'\fP This shows the configuration of your gd extension. You can use this to easily check which imag formats you can use. If you have any dynamic modules you may want to use the same ini file that php uses when executed from your webserver. There are more extensions which -have such a function. For dba use php \-r 'print_r(dba_handlers(1));' +have such a function. For dba use: +.RS +\fIphp \-r 'print_r(dba_handlers(1));'\fP +.RE .TP -php \-d html_errors=1 \-i | php \-R 'echo strip_tags($argn)."\\n";' +\fIphp \-d html_errors=1 \-i | php \-R 'echo strip_tags($argn)."\\n";'\fP This example uses PHP first to generate a HTML output. This is meant to be replaced with any tool that displays HTML (for instance you could use 'cat file.html'). The second php command now strips off the HTML tags line by line and outputs the result. .TP -php \-E 'echo "Lines: $argi\\n";' +\fIphp \-E 'echo "Lines: $argi\\n";'\fP This command shows the number of lines being input. .TP -php \-R '$l+=count(file($argn));' \-E'echo "Lines:$l\\n";' +\fIphp \-R '$l+=count(file($argn));' \-E'echo "Lines:$l\\n";'\fP This commands expects each input line beeing a file. It counts all lines of the files specified by each input line and shows the summarized result. You may combine this with tools like find and change the php scriptlet. .TP -php \-R 'echo $argn; fgets(STDIN);' +\fIphp \-R 'echo "$argn\\n"; fgets(STDIN);'\fP Since you have access to STDIN from within \-B \-R and \-F you can skip certain input lines with your code. But note that in such cases $argi only counts the lines being processed by php itself. Having read this you will guess what the @@ -237,6 +232,7 @@ such a first line as shown below: .P .PD 0 +.RS #!/bin/php .P <?php @@ -244,6 +240,7 @@ // your script .P ?> +.RE .PD 1 .P .SH SEE ALSO @@ -252,6 +249,12 @@ .P .B http://www.php.net/manual/ .PD 1 +.P +A nice introduction to PHP by Stig Sæther Bakken can be found here: +.PD 0 +.P +.B http://www.zend.com/zend/art/intro.php +.PD 1 .SH BUGS You can view the list of known bugs or add any new bug you found here: @@ -272,8 +275,10 @@ .P And last but not least PHP was developed with the help of a huge amount of contributors all around the world. +.SH VERSION INFORMATION +This manpage describes \fBphp\fP, version 5.0.0. .SH COPYRIGHT -Copyright (c) 1997-2003 The PHP Group +Copyright \(co 1997\-2003 The PHP Group .LP This source file is subject to version 2.02 of the PHP license, that is bundled with this package in the file LICENSE, and is
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php