您好,欢迎访问一九零五行业门户网

php常用命令_PHP教程

1.php -v 查看版本号
[root@rs-2 lib]# php -v
php 5.5.11 (cli) (built: apr 29 2014 12:35:52)
copyright (c) 1997-2014 the php group
zend engine v2.5.0, copyright (c) 1998-2014 zend technologies
2.php -h 查看帮助
3.php -m 查看安装的模块
[root@rs-2 lib]# php -m
[php modules]
core
type
4.php -i 查看php信息(查看php.ini非常方便)
[root@rs-2 lib]# php -i | grep php.ini
configuration file (php.ini) path => /usr/local/lib
loaded configuration file => /usr/local/lib/php.ini
5.php --ini 显示配置文件名字
[root@rs-2 ~]# php --ini
configuration file (php.ini) path: /usr/local/lib
loaded configuration file: /usr/local/lib/php.ini
scan for additional .ini files in: (none)
additional .ini files parsed: (none)
6.php -f 执行php文件
[root@rs-2 phptest]# php -f helloworld.php
helloword
更多使用技巧请看php -h
[root@rs-2 ~]# php -h
usage: php [options] [-f] [--] [args...]
php [options] -r [--] [args...]
php [options] [-b ] -r [-e ] [--] [args...]
php [options] [-b ] -f [-e ] [--] [args...]
php [options] -s : [-t docroot]
php [options] -- [args...]
php [options] -a
-a run interactively
-c | look for php.ini file in this directory
-n no php.ini file will be used
-d foo[=bar] define ini entry foo with value 'bar'
-e generate extended information for debugger/profiler
-f parse and execute .
-h this help
-i php information
-l syntax check only (lint)
-m show compiled in modules
-r run php without using script tags ..?>
-b run php before processing input lines
-r run php for every input line
-f parse and execute for every input line
-e run php after processing all input lines
-h hide any passed arguments from external tools.
-s : run with built-in web server.
-t specify document root for built-in web server.
-s output html syntax highlighted source.
-v version number
-w output source with stripped comments and whitespace.
-z load zend extension .
args... arguments passed to script. use -- args when first argument
starts with - or script is read from stdin
--ini show configuration file names
--rf show information about function .
--rc show information about class .
--re show information about extension .
--rz show information about zend extension .
--ri show configuration for extension .
http://www.bkjia.com/phpjc/777561.htmlwww.bkjia.comtruehttp://www.bkjia.com/phpjc/777561.htmltecharticle1.php -v 查看版本号 [root@rs-2 lib]# php -v php 5.5.11 (cli) (built: apr 29 2014 12:35:52) copyright (c) 1997-2014 the php group zend engine v2.5.0, copyright (c) 1998-2014 ze...
其它类似信息

推荐信息