How to get php.ini file path on the server using PHP function

No comments
php.ini file is very useful configuration file in php that is required in an application developed in PHP platform, this file is used to control variables like max_upload_size, file timeout settings and resource limits etc.

There are couple of way to get php.ini file path. First one, by running phpinfo() function and second one is by using php_ini_loaded_file() function. You will need to create a php file for example abc.php in your root directory and then paste below code in it and then run the file in the browser.

 print_r(php_ini_loaded_file());  

And the output would be something like below:
 /etc/php5/apache2/php.ini  

No comments :

Post a Comment