【问题标题】:Where can I find the PHPIniDir directive and its value in XAMPP installation setup on Windows 10 operating system?在 Windows 10 操作系统的 XAMPP 安装设置中,我在哪里可以找到 PHPIniDir 指令及其值?
【发布时间】:2018-11-08 09:22:51
【问题描述】:

我使用的是Windows 10 Home Single Language版本,它是一个64位操作系统

我已经在这台机器上使用最新的 XAMPP 副本安装了 Apache、PHP、MySQL。

我在PHP Manual中读到了下面这句话:

php.ini 在这些位置被搜索(按顺序):

  • SAPI 模块特定位置(Apache 2 中的 PHPIniDir 指令,CGI 和 CLI 中的 -c 命令行选项,NSAPI 中的 php_ini 参数, PHP_INI_PATH THTTPD 中的环境变量)

我的机器上的所有东西都安装正确。我在浏览器中检查了phpinfo(); 的输出,但在其中的任何位置都找不到 PHPIniDir 指令及其值。

那么,请告诉我在哪里可以找到 PHPIniDir 指令及其值?

【问题讨论】:

    标签: php windows apache xampp php-ini


    【解决方案1】:

    httpd-xampp.conf(Apache配置文件)中,例如:

    PHPIniDir "C:/php" 
    

    httpd-xampp.conf 文件位于您的apache 安装文件夹中,如果您使用 xampp:xampp\apache\conf\extra

    更新:

    正如 OP 指出的那样,xampp 将其包含在:

    C:\xampp\apache\conf\extra\httpd-xampp.conf 文件中的第 1 行。 39 到 41:

    <IfModule php7_module> PHPINIDir "C:/xampp/php" </IfModule>

    【讨论】:

    • 我应该如何在 web 浏览器中显示的 phpinfo() 的输出中检查文件“httpd.conf”的位置?
    • 应该显示默认配置文件
    • 更正:我在 'C:\xampp\apache\conf\extra\httpd-xampp.conf' 位置找到了 apache 配置文件,请相应地更正您的答案。
    • @Tamas Szoke : phpinfo() 的输出; Web 浏览器中显示的内容不包含“httpd-xampp.conf”之类的内容。那么,你认为你的答案应该得到相应的修改吗?
    猜你喜欢
    • 2016-09-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-12-09
    • 1970-01-01
    • 2021-03-06
    • 1970-01-01
    相关资源
    最近更新 更多