Where can I find php.ini?

后端 未结 14 2454
無奈伤痛
無奈伤痛 2020-11-22 11:58

A few years ago I installed Apache 2.2x and PHP 5.3.1 on a Linux server I maintain. I used .tar.gz\'s and built them as instructed (instead of rpms and what-have-you). And

14条回答
  •  臣服心动
    2020-11-22 12:06

    There are several valid ways already mentioned for locating the php.ini file, but if you came across this page because you want to do something with it in a bash script:

    path_php_ini="$(php -i | grep 'Configuration File (php.ini) Path' | grep -oP '(?<=\=\>\s).*')" echo ${path_php_ini}

提交回复
热议问题