To find your php.ini just run
php --ini
(PHP 5 >= 5.2.4, PHP 7, PHP 8)
php_ini_loaded_file — Retrieve a path to the loaded php.ini file
Check if a php.ini file is loaded, and retrieve its path.
This function has no parameters.
The loaded php.ini path, or false
if one is not loaded.
Example #1 php_ini_loaded_file() example
<?php
$inipath = php_ini_loaded_file();
if ($inipath) {
echo 'Loaded php.ini: ' . $inipath;
} else {
echo 'A php.ini file is not loaded';
}
?>
The above example will output something similar to:
Loaded php.ini: /usr/local/php/php.ini
Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!
Check out: eBank.nz (Art Generator) |
Netwrck.com (AI Tools) |
Text-Generator.io (AI API) |
BitBank.nz (Crypto AI) |
ReadingTime (Kids Reading) |
RewordGame |
BigMultiplayerChess |
WebFiddle |
How.nz |
Helix AI Assistant