You are here
linux php 命令行常用的命令 参数
星期三, 2015-11-18 11:23 — shiping1
root@coder-671T-M:/etc/php5/apache2# php --versionPHP 5.3.6-13ubuntu3.2 with Suhosin-Patch (cli) (built: Oct 13 2011 23:19:13) Copyright (c) 1997-2011 The PHP GroupZend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologiesroot@coder-671T-M:/etc/php5/apache2# php -m[PHP Modules]bcmathbz2calendarCorectypecurldatedbadomeregexiffileinfofilterftpgdgettexthashiconvjsonlibxmlmbstringmcryptmhashmysqlmysqliopensslpcntlpcrePDOpdo_mysqlPharposixreadlineReflectionsessionshmopSimpleXMLsoapsocketsSPLstandardsysvmsgsysvsemsysvshmtokenizerwddxxmlxmlreaderxmlwriterzipzlib[Zend Modules]root@coder-671T-M:/etc/php5/apache2# php --helpUsage: php [options] [-f] <file> [--] [args...] php [options] -r <code> [--] [args...] php [options] [-B <begin_code>] -R <code> [-E <end_code>] [--] [args...] php [options] [-B <begin_code>] -F <file> [-E <end_code>] [--] [args...] php [options] -- [args...] php [options] -a -a Run as interactive shell -c <path>|<file> 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 <file> Parse and execute <file>. -h This help -i PHP information -l Syntax check only (lint) -m Show compiled in modules -r <code> Run PHP <code> without using script tags <?..?> -B <begin_code> Run PHP <begin_code> before processing input lines -R <code> Run PHP <code> for every input line -F <file> Parse and execute <file> for every input line -E <end_code> Run PHP <end_code> after processing all input lines -H Hide any passed arguments from external tools. -s Output HTML syntax highlighted source. -v Version number -w Output source with stripped comments and whitespace. -z <file> Load Zend extension <file>. args... Arguments passed to script. Use -- args when first argument starts with - or script is read from stdin --ini Show configuration file names --rf <name> Show information about function <name>. --rc <name> Show information about class <name>. --re <name> Show information about extension <name>. --ri <name> Show configuration for extension <name>.root@coder-671T-M:/etc/php5/apache2# php -i | grep mysql/etc/php5/cli/conf.d/mysql.ini,/etc/php5/cli/conf.d/mysqli.ini,/etc/php5/cli/conf.d/pdo_mysql.inimysqlMYSQL_SOCKET => /var/run/mysqld/mysqld.sockMYSQL_INCLUDE => -I/usr/include/mysqlMYSQL_LIBS => -L/usr/lib -lmysqlclient_r mysql.allow_local_infile => On => Onmysql.allow_persistent => On => Onmysql.connect_timeout => 60 => 60mysql.default_host => no value => no valuemysql.default_password => no value => no valuemysql.default_port => no value => no valuemysql.default_socket => /var/run/mysqld/mysqld.sock => /var/run/mysqld/mysqld.sockmysql.default_user => no value => no valuemysql.max_links => Unlimited => Unlimitedmysql.max_persistent => Unlimited => Unlimitedmysql.trace_mode => Off => OffmysqliMYSQLI_SOCKET => /var/run/mysqld/mysqld.sockmysqli.allow_local_infile => On => Onmysqli.allow_persistent => On => Onmysqli.default_host => no value => no valuemysqli.default_port => 3306 => 3306mysqli.default_pw => no value => no valuemysqli.default_socket => no value => no valuemysqli.default_user => no value => no valuemysqli.max_links => Unlimited => Unlimitedmysqli.max_persistent => Unlimited => Unlimitedmysqli.reconnect => Off => OffPDO drivers => mysqlpdo_mysqlroot@coder-671T-M:/etc/php5/apache2#
来自 http://blog.csdn.net/mengxiangbaidu/article/details/6977785