首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

php_ini_loaded_file

(PHP 5 >= 5.2.4, PHP 7)

php_ini_loaded_file — Retrieve a path to the loaded php.ini file

Description

代码语言:javascript
复制
string php_ini_loaded_file ( void )

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

Parameters

This function has no parameters.

Return Values

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

Examples

Example #1 php_ini_loaded_file() example

代码语言:javascript
复制
<?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:

代码语言:javascript
复制
Loaded php.ini: /usr/local/php/php.ini

See Also

  • php_ini_scanned_files() - Return a list of .ini files parsed from the additional ini dir
  • phpinfo() - Outputs information about PHP's configuration

← memory_get_usage

php_ini_scanned_files →

代码语言:txt
复制
 © 1997–2017 The PHP Documentation Group

Licensed under the Creative Commons Attribution License v3.0 or later.

扫码关注腾讯云开发者

领取腾讯云代金券