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

如何在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)

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

报告相同问题?

悬赏问题

  • ¥15 机器学习教材中的例题询问
  • ¥15 求.net core 几款免费的pdf编辑器
  • ¥20 SQL server表计算问题
  • ¥15 C# P/Invoke的效率问题
  • ¥20 thinkphp适配人大金仓问题
  • ¥20 Oracle替换.dbf文件后无法连接,如何解决?(相关搜索:数据库|死循环)
  • ¥15 数据库数据成问号了,前台查询正常,数据库查询是?号
  • ¥15 算法使用了tf-idf,用手肘图确定k值确定不了,第四轮廓系数又太小才有0.006088746097507285,如何解决?(相关搜索:数据处理)
  • ¥15 彩灯控制电路,会的加我QQ1482956179
  • ¥200 相机拍直接转存到电脑上 立拍立穿无线局域网传