问题描述
我发现/etc/php5/cli
中的.ini文件与PHP的CLI使用有关,/etc/php5/fpm
中的文件是关于PHP的FastCGI/FPM方面,但是位于/etc/php5/conf.d
中的.ini文件呢?
I get that the .ini files in /etc/php5/cli
have to do with CLI usage of PHP, the files in /etc/php5/fpm
are about FastCGI/FPM aspect of PHP, but what about the .ini files located in /etc/php5/conf.d
?
推荐答案
来自/usr/share/doc/php5-common/README.Debian.gz
(在安装了PHP的Ubuntu系统上):
From /usr/share/doc/php5-common/README.Debian.gz
(on an Ubuntu system with PHP installed):
--with-config-file-scan-dir=/etc/php5/$SAPI/conf.d
对于所有SAPI而言,实际上是指向中央的符号链接目录/etc/php5/conf.d.在此目录末尾找到的任何文件.ini中的内容将被php SAPI视为配置文件.
which for all SAPI's is actually a symlink pointing to a central directory /etc/php5/conf.d. Any file found in this directory ending in .ini will be treated as a configuration file by the php SAPI.
此方法的基本原理是每个SAPI可以因此使用最少的conffile配置进行相同的配置,但是同时,如果您要进行特定于SAPI的配置,则可以只需删除符号链接即可.
The rationale with this method is that each SAPI can thus be identically configured with a minimal amount of conffile handling, but at the same time if you want to have SAPI-specific configuration, you can just remove the symlink.
这篇关于/etc/php5/conf.d文件夹中的.ini文件有哪些用途?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!