How to get the php.ini file path in PHP?

Sometimes, we need to check the php.ini file location for configuration. In this article, I am sharing with you, how can you easily find the php.ini file location.

You can get location by using php_ini_loaded_file() of PHP.

Example:

<?php
//print php.ini file location
print_r(php_ini_loaded_file());
?>

The output look similar below in the ubuntu system:

 

/etc/php74/apache2/php.ini
Tags : PHP

Related Post

How to Format numbers to nearest thousands in php
How to Solve PHP Fatal error: Allowed memory size of 8388608 bytes exhausted
How to increase maximum execution time in PHP
Install PHP 7.4 ubuntu 20.04
Maksud

Maksud

I am a thinker, not a talker.