where do i find php.ini code example

Example 1: how to find php.ini

php -i | grep "Loaded Configuration File"

Example 2: find which php.ini is used

for cmd : php --ini
  
for code : use php_ini_loaded_file() as :=

$inipath = php_ini_loaded_file();
if ($inipath) {
    echo 'Loaded php.ini: ' . $inipath;
} else {
    echo 'A php.ini file is not loaded';
}

Example 3: To find out where your php.ini is located

run: php --ini

Example 4: where is php.ini file

#Here is the path of php.ini file 

C:\xampp\php\php.ini

#check in your system drive where the wamp or Xampp is install

Tags:

Php Example