/etc/php5/conf.d文件夹中的.ini文件有哪些用途? [英] What are the .ini files in /etc/php5/conf.d folder for?

查看:54
本文介绍了/etc/php5/conf.d文件夹中的.ini文件有哪些用途?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现/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):

此外,每个SAPI都配置有编译时选项

Additionally, each SAPI is configured with the compile-time option

    --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文件有哪些用途?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆