We will learn How to get php.ini file path

Example:

print_r(php_ini_loaded_file());

You can find output something like bellow if you are use ubuntu system:

/etc/php5/apache2/php.ini

May this help you