php_ini_scanned_files
Returns a list of .ini files parsed from the attached ini directory
Function name: php_ini_scanned_files()
Applicable version: PHP 4.3.0 and above
Function description: The php_ini_scanned_files() function returns an array containing the path of the currently parsed php.ini file.
Usage example:
<?php // 获取当前解析的php.ini文件路径的数组$iniFiles = php_ini_scanned_files(); // 输出每个php.ini文件的路径foreach ($iniFiles as $file) { echo $file . "<br>"; } ?>
Example explanation: In the above example, first use the php_ini_scanned_files() function to get the array of currently parsed php.ini file paths. Then, use foreach to loop through the array, outputting the path to each php.ini file to the page.
Notes: