dqq3623 2015-04-09 01:11
浏览 761
已采纳

如何在PhpStorm中设置php.ini文件的路径

How do you specify the path to the php.ini file in PhpStorm?

I am trying to build run configurations for Built-in Web Server and PHPUnit, but I cannot figure out how to specify the path of the php.ini file.

The only resource that I can find is this, but it does not appear to work for current versions of PhpStorm.

I have set the interpreter options to --php-ini C:\PHP\php-5.6.7\php.ini. This is the correct path to the file. However, when I get the phpinfo(), it reports:

Configuration File (php.ini) Path   C:\Windows
Loaded Configuration File   (none)
Scan this dir for additional .ini files (none)
Additional .ini files parsed    (none)

(This is related to another question that I asked, but it is specific enough, I think, that a new thread is warranted.)

  • 写回答

1条回答 默认 最新

  • dongzhuang6177 2015-04-09 09:08
    关注

    Working just fine using -c for specifying path to custom php.ini

    enter image description here

    P.S. Ignore the small path difference -- it's because E:\Projects\php\ is a symlink to E:\Projects\php56\ and I did not bother to use "real" path.

    P.P.S. Works for both local "PHPUnit" and "PHP Script" types of Run/Debug configurations.


    I believe that currently it's not possible to provide path to custom php.ini for built-in web server as it uses your default local PHP Interpreter and that has no options for providing custom parameters (except those passed via -d option)

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥35 平滑拟合曲线该如何生成
  • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
  • ¥15 名为“Product”的列已属于此 DataTable
  • ¥15 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站
  • ¥50 成都蓉城足球俱乐部小程序抢票
  • ¥15 yolov7训练自己的数据集