Function name: php_ini_loaded_file()
Applicable version: PHP 4, PHP 5, PHP 7
Function Description: The php_ini_loaded_file() function returns the path to the php.ini file of the currently running PHP parser.
Usage: string php_ini_loaded_file ( void )
Parameters: This function does not accept any parameters.
Return value: If the php.ini file is successfully found and loaded, the path to the file is returned, and if it is not found or failed to load, false.
Example:
Output: The php.ini file path of the currently running PHP parser is: /etc/php.ini
Description: In this example, the php_ini_loaded_file() function is used to get the path to the php.ini file of the currently running PHP parser. If the php.ini file is successfully found and loaded, the path is output through the echo statement. If not found or fails to load, the prompt message is output through the echo statement.