SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG
DONATE


YUM REPOSITORY

 
 

MAN page from Mandrake 9.X php-4.3.3-2rph.i586.rpm

PHP

Section: Scripting Language (1)
Updated: Feb 2003
Index 

NAME

php
PHP Command Line Interface 'CLI'
 

SYNOPSIS

php[options] [-f ]file[[--] args...]

php[options] -r code[[--]args...]

php[options] -- [args...]

 

DESCRIPTION

PHPis a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. This is the command line interfacethat enables you to the following:You can parse and execute files by using parameter -f followed by the name of the fileto be executed.

Using parameter -r you can directly execute PHP codesimply as you would do inside a .php file when using the eval() function.

If none of -r or -f is present but a single parameter is given then this parameter is taken as the filename to parse and execute (same as with -f). If no parameter is present then the standard input is read and executed. 

OPTIONS

-a
Run interactively
-c path|file
Look for php.ini file in the directorypathor use the specifiedfile
-n
No php.ini file will be used
-d foo[=bar]
Define INI entry foowith valuebar
-e
Generate extended information for debugger/profiler
-f file
Parse and execute file
-h
This help
-i
PHP information and configuration
-l
Syntax check only (lint)
-m
Show compiled in modules
-r code
Run PHP codewithout using script tags'<?..?>'
-s
Display colour syntax highlighted source
-v
Version number
-w
Display source with stripped comments and whitespace
-z file
Load Zend extension file
args...
Arguments passed to script. Use '--'argswhen first argument starts with '-'or script is read from stdin
 

FILES

php-cli.ini
The configuration file for the CLI version of PHP.
php.ini
The standard configuration file will only be used when php-cli.inicannot not be found.
 

EXAMPLES

php -r 'echo "Hello World\n";'
This command simply writes the text "Hello World" to stabdard out.
php -r 'print_r(gd_info());'
This shows the configuration of your gd extension. You can use thisto easily check which imag formats you can use. If you have anydynamic modules you may want to use the same ini file that php useswhen executed from your webserver. There are more extensions whichhave such a function. For dba use:
php -r 'print_r(dba_handlers(1));'
 

TIPS

You can use a shebang line to automatically invoke phpfrom scripts. Only the CLI version of PHP will ignoresuch a first line as shown below:
#!/bin/php<?php
 // your script?>
 

SEE ALSO

For a more or less complete description of PHP look here:http://www.php.net/manual/A nice introduction to PHP by Stig Sæther Bakken can be found here:http://www.zend.com/zend/art/intro.php 

BUGS

You can view the list of known bugs or add any new bug youfound here:http://bugs.php.net 

AUTHORS

The PHP Group: Thies C. Arntzen, Stig Bakken, Andi Gutmans, Rasmus Lerdorf, Sam Ruby, Sascha Schumann, Zeev Suraski, Jim Winstead, Andrei Zmievski.Additional work for the CLI sapi was done by Edin Kadribasic and Marcus Boerger.A List of active developers can be found here:http://www.php.net/credits.phpAnd last but not least PHP was developed with the help of a huge amount of contributors all around the world. 

VERSION INFORMATION

This manpage describes php, version 4.3.3. 

COPYRIGHT

Copyright © 1997-2003 The PHP Group

This source file is subject to version 3.0 of the PHP license,that is bundled with this package in the file LICENSE, and isavailable at through the world-wide-web athttp://www.php.net/license/3_0.txtIf you did not receive a copy of the PHP license and are unable toobtain it through the world-wide-web, please send a note tolicenseAATTphp.net so we can mail you a copy immediately.


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
FILES
EXAMPLES
TIPS
SEE ALSO
BUGS
AUTHORS
VERSION INFORMATION
COPYRIGHT

This document was created byman2html,using the manual pages.