How to get php.ini file path?

By Hardik Savani | April 20, 2016 | | 1293 Viewer | Category : PHP Wampserver Installation Ubuntu


Share this post:

You can get location path of php.ini file using php_ini_loaded_file() of PHP. Sometimes we require to get php.ini file path. So, if you need to get path of php confogration file then you can get following way:

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