术语“ INI文件”是否表示在“ php.ini”或“ .user.ini样式的INI文件”(例如“ .htaccess”文件)之后解析的配置文件? [英] Does the term 'INI files' mean configuration files parsed after 'php.ini' or the '.user.ini-style INI files' like '.htaccess' files?

查看:126
本文介绍了术语“ INI文件”是否表示在“ php.ini”或“ .user.ini样式的INI文件”(例如“ .htaccess”文件)之后解析的配置文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 PHP 7.2.8

我已使用最新版本的 XAMPP安装了PHP 软件包,该软件包还安装了 Apache / 2.4.34(Win32)

I've installed PHP using the latest version of XAMPP package which has also installed Apache/2.4.34 (Win32)

我从 PHP手册


除了主 php.ini 文件外,PHP还扫描每个$ b中的INI文件。 $ b目录,从请求的PHP文件的目录开始,然后
一直运行到当前文档的根目录(在
$ _ SERVER ['DOCUMENT_ROOT'] <中设置/ code>)。如果PHP文件不在
文档根目录下,则仅扫描其目录。

In addition to the main php.ini file, PHP scans for INI files in each directory, starting with the directory of the requested PHP file, and working its way up to the current document root (as set in $_SERVER['DOCUMENT_ROOT']). In case the PHP file is outside the document root, only its directory is scanned.

上面的文本创建了以下是我的疑问:

The above text has created the following doubt in my mind which is as follows :

以上文字中的'INI文件'是指什么?

What the term used 'INI files' in the above text is referring to?

是否引用设置了目录的目录中的'。ini文件'在编译时通过设置-with-config-file-scan-dir 选项,也可以通过环境变量 PHP_INI_SCAN_DIR 在运行时还是'。user.ini样式的INI文件',例如'。htaccess'文件?

Whether it refers to the '.ini files' present in a directory which(the directory) is set at compile time by setting the --with-config-file-scan-dir option, optionally, by an environment variable PHP_INI_SCAN_DIR at run time or the '.user.ini-style INI files' like '.htaccess' files?

推荐答案


... PHP扫描每个目录中的INI文件...

… PHP scans for INI files in each directory …

整个手册部分仅与 .user.ini 文件有关。

This whole manual section is only about .user.ini files.


  • 格式等效于主要的 php.ini

这仅适用于CGI / FCGI / FPM设置。

This only applies to CGI/FCGI/FPM setups.


...我正在使用Apache Web erver…

… in my case as I'm using Apache web server …




  • 与Apache / mod_php配置无关。

    • No relevancy to Apache/mod_php configurations.

      .htaccess 配置文件和 php_flag / php_value 指令不是不是 INI样式。

      The .htaccess config file and php_flag/php_value directives are not INI-style.

      您已经知道,PHP本身并没有这样做。不读他们。 (好吧,间接地。Apache解析它们。)

      As you already know, PHP itself doesn't read them. (Well, indirectly. Apache parses them.)


      告诉我是否为'。 htaccess文件(如果将PHP作为Apache模块运行)是否为 .user.ini样式的INI文件?

      Tell me whether the '.htaccess file'(in case of running PHP as Apache module) is a '.user.ini-style INI file' or not?




      • 不是。


      • -config-file-scan-dir PHP_INI_SCAN_DIR




        • 也与 .user.ini .htaccess 文件。

          这用于辅助php.ini包括(例如模块加载/设置,例如 / etc / php /7.3/fpm/conf.d/20-gettext.ini /甚至XAMPP也应该有这样的内容)

          This is used for auxilliary php.ini includes (e.g. module loading/settings, such as /etc/php/7.3/fpm/conf.d/20-gettext.ini / even XAMPP should have something like this)

          这篇关于术语“ INI文件”是否表示在“ php.ini”或“ .user.ini样式的INI文件”(例如“ .htaccess”文件)之后解析的配置文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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