方式一:

$ php --ini

方式二:

$ php -i | grep php.ini

方式三:

$ find / -name 'php.ini'