/etc/php5/conf.d文件夹中的.ini文件是做什么用的? [英] What the .ini files in /etc/php5/conf.d folder are for?

查看:109
本文介绍了/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。 php SAPI将在此目录中找到以.ini结尾的所有文件,这些文件以
结尾。

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因此,可以用最少的配置文件配置来对
进行相同的配置,但是如果您想进行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天全站免登陆