- Added php_ini_loaded_file() function which returns the path to the actual

php.ini in use.
# there was only a function to return the _additional_ files in use..
This commit is contained in:
foobar 2007-06-09 11:42:55 +00:00
parent eae4b3109e
commit 53b43a63cd
3 changed files with 19 additions and 0 deletions

View File

@ -1756,6 +1756,10 @@ ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_php_ini_scanned_files, 0)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_php_ini_loaded_file, 0)
ZEND_END_ARG_INFO()
/* }}} */
/* {{{ iptc.c */
static
@ -3172,6 +3176,7 @@ zend_function_entry basic_functions[] = {
PHP_FE(php_sapi_name, arginfo_php_sapi_name)
PHP_FE(php_uname, arginfo_php_uname)
PHP_FE(php_ini_scanned_files, arginfo_php_ini_scanned_files)
PHP_FE(php_ini_loaded_file, arginfo_php_ini_loaded_file)
PHP_FE(strnatcmp, arginfo_strnatcmp)
PHP_FE(strnatcasecmp, arginfo_strnatcasecmp)

View File

@ -1107,6 +1107,18 @@ PHP_FUNCTION(php_ini_scanned_files)
}
/* }}} */
/* {{{ proto string php_ini_loaded_file(void)
Return the actual loaded ini filename */
PHP_FUNCTION(php_ini_loaded_file)
{
if (php_ini_opened_path) {
RETURN_STRING(php_ini_opened_path, 1);
} else {
RETURN_FALSE;
}
}
/* }}} */
/*
* Local variables:
* tab-width: 4

View File

@ -66,6 +66,8 @@ PHP_FUNCTION(php_egg_logo_guid);
PHP_FUNCTION(php_sapi_name);
PHP_FUNCTION(php_uname);
PHP_FUNCTION(php_ini_scanned_files);
PHP_FUNCTION(php_ini_loaded_file);
/* NOTE: use UTF-8 if you print anything non-ASCII */
PHPAPI char *php_info_html_esc(char *string TSRMLS_DC);
PHPAPI void php_print_info_htmlhead(TSRMLS_D);