array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'de', ), 'this' => array ( 0 => 'function.php-ini-loaded-file.php', 1 => 'php_ini_loaded_file', 2 => 'Retrieve a path to the loaded php.ini file', ), 'up' => array ( 0 => 'ref.info.php', 1 => 'PHP-Optionen-/-Informationen-Funktionen', ), 'prev' => array ( 0 => 'function.memory-reset-peak-usage.php', 1 => 'memory_reset_peak_usage', ), 'next' => array ( 0 => 'function.php-ini-scanned-files.php', 1 => 'php_ini_scanned_files', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/info/functions/php-ini-loaded-file.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

php_ini_loaded_file

(PHP 5 >= 5.2.4, PHP 7, PHP 8)

php_ini_loaded_fileRetrieve a path to the loaded php.ini file

Beschreibung

php_ini_loaded_file(): string|false

Check if a php.ini file is loaded, and retrieve its path.

Parameter-Liste

Diese Funktion besitzt keine Parameter.

Rückgabewerte

The loaded php.ini path, or false if one is not loaded.

Beispiele

Beispiel #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';
}
?>

Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:

Loaded php.ini: /usr/local/php/php.ini

Siehe auch