sniper          Sat Jun  9 11:42:56 2007 UTC

  Modified files:              
    /php-src/ext/standard       basic_functions.c info.c info.h 
  Log:
  - 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..
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.858&r2=1.859&diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.858 
php-src/ext/standard/basic_functions.c:1.859
--- php-src/ext/standard/basic_functions.c:1.858        Tue May 22 14:32:39 2007
+++ php-src/ext/standard/basic_functions.c      Sat Jun  9 11:42:55 2007
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: basic_functions.c,v 1.858 2007/05/22 14:32:39 tony2001 Exp $ */
+/* $Id: basic_functions.c,v 1.859 2007/06/09 11:42:55 sniper Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -1756,6 +1756,10 @@
 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 @@
        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)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/info.c?r1=1.279&r2=1.280&diff_format=u
Index: php-src/ext/standard/info.c
diff -u php-src/ext/standard/info.c:1.279 php-src/ext/standard/info.c:1.280
--- php-src/ext/standard/info.c:1.279   Thu Jun  7 09:07:12 2007
+++ php-src/ext/standard/info.c Sat Jun  9 11:42:55 2007
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: info.c,v 1.279 2007/06/07 09:07:12 tony2001 Exp $ */
+/* $Id: info.c,v 1.280 2007/06/09 11:42:55 sniper Exp $ */
 
 #include "php.h"
 #include "php_ini.h"
@@ -1107,6 +1107,18 @@
 }
 /* }}} */
 
+/* {{{ 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
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/info.h?r1=1.43&r2=1.44&diff_format=u
Index: php-src/ext/standard/info.h
diff -u php-src/ext/standard/info.h:1.43 php-src/ext/standard/info.h:1.44
--- php-src/ext/standard/info.h:1.43    Tue Jan 23 19:58:45 2007
+++ php-src/ext/standard/info.h Sat Jun  9 11:42:55 2007
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: info.h,v 1.43 2007/01/23 19:58:45 helly Exp $ */
+/* $Id: info.h,v 1.44 2007/06/09 11:42:55 sniper Exp $ */
 
 #ifndef INFO_H
 #define INFO_H
@@ -66,6 +66,8 @@
 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);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to