Home | 简体中文 | 繁体中文 | 杂文 | Search | ITEYE 博客 | OSChina 博客 | Facebook | Linkedin | 作品与服务 | Email

1.2. php 命令

1.2.1. -c <path>|<file> Look for php.ini file in this directory

指定php.ini文件

php -c /etc/php/cli/php.ini -f test.php
			

1.2.2. -d foo[=bar] Define INI entry foo with value 'bar'

php -d error_log=/tmp/php_errors.log -c /srv/php/etc/php-cli.ini synchronous.php restart			
			

1.2.3. --ini Show configuration file names

显示配置文件名

$ php --ini
Configuration File (php.ini) Path: /etc/php5/cli
Loaded Configuration File:         /etc/php5/cli/php.ini
Scan for additional .ini files in: /etc/php5/cli/conf.d
Additional .ini files parsed:      /etc/php5/cli/conf.d/05-opcache.ini,
/etc/php5/cli/conf.d/10-pdo.ini,
/etc/php5/cli/conf.d/20-curl.ini,
/etc/php5/cli/conf.d/20-json.ini,
/etc/php5/cli/conf.d/20-readline.ini

# php --ini
Configuration File (php.ini) Path: /srv/php-5.5.13/etc
Loaded Configuration File:         /srv/php-5.5.13/etc/php.ini
Scan for additional .ini files in: /srv/php-5.5.13/etc/conf.d
Additional .ini files parsed:      /srv/php-5.5.13/etc/conf.d/amqp.ini,
/srv/php-5.5.13/etc/conf.d/pthreads.ini,
/srv/php-5.5.13/etc/conf.d/redis.ini,
/srv/php-5.5.13/etc/conf.d/safenet.ini,
/srv/php-5.5.13/etc/conf.d/xdebug.ini
			
comments powered by Disqus