1
0
mirror of https://github.com/php/php-src.git synced 2026-03-27 01:32:22 +01:00

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

php.ini in use.
This commit is contained in:
foobar
2007-06-09 11:44:08 +00:00
parent 1351bc4e86
commit f7d22b60f0
4 changed files with 20 additions and 0 deletions

2
NEWS
View File

@@ -3,6 +3,8 @@ PHP NEWS
?? ??? 2007, PHP 5.2.4
- Improved fix for MOPB-03-2007. (Ilia)
- Corrected fix for CVE-2007-2872. (Ilia)
- Added php_ini_loaded_file() function which returns the path to the actual
php.ini in use. (Jani)
- Added GD version constants GD_MAJOR_VERSION, GD_MINOR_VERSION
GD_RELEASE_VERSION, GD_EXTRA_VERSION and GD_VERSION_STRING. (Pierre)
- Added missing open_basedir checks to CGI. (anight at eyelinkmedia dot com,

View File

@@ -1765,6 +1765,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
@@ -3132,6 +3136,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

@@ -1170,6 +1170,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,7 @@ 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);
PHPAPI char *php_info_html_esc(char *string TSRMLS_DC);
PHPAPI void php_info_html_esc_write(char *string, int str_len TSRMLS_DC);
PHPAPI void php_print_info_htmlhead(TSRMLS_D);