Current Location: Home> Function Categories> php_ini_scanned_files

php_ini_scanned_files

Returns a list of .ini files parsed from the attached ini directory
Name:php_ini_scanned_files
Category:PHP Options and Information
Programming Language:php
One-line Description:Returns an array containing the path to the currently parsed php.ini file

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:

  • This function is available in PHP 4.3.0 and above.
  • If no php.ini files are found, the function returns false.
  • The paths in the returned array may be relative or absolute paths, depending on the configuration of the php.ini file.
  • This function returns only the parsed php.ini file path, and the unparsed file path will not be included in the returned array.
Similar Functions
Popular Articles