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

Added php_get_tmpdir() function that returns the default directory for

temporary files (as requested in bug #35380)
This commit is contained in:
Hartmut Holzgraefe
2006-05-06 09:59:02 +00:00
parent 111d608ff1
commit daa5febadf
4 changed files with 13 additions and 0 deletions

2
NEWS
View File

@@ -52,6 +52,8 @@ PHP NEWS
defined using reflection API. (Johannes)
- Added second optional parameter to stream_context_create() to set params
during context creation. (Sara)
- Added php_get_tmpdir() function that returns the default directory for
temporary files (as requested in bug #35380). (Hartmut)
- Fixed bug #36630 (umask not reset at the end of the request). (Ilia)
- Fixed bug #34286 (__toString() behavior is inconsistent). (Marcus)

View File

@@ -846,6 +846,8 @@ zend_function_entry basic_functions[] = {
PHP_FE(output_add_rewrite_var, NULL)
PHP_FE(output_reset_rewrite_vars, NULL)
PHP_FE(php_get_tmpdir, NULL)
{NULL, NULL, NULL}
};

View File

@@ -2555,6 +2555,14 @@ PHP_FUNCTION(fnmatch)
/* }}} */
#endif
/* {{{ proto string php_get_tmpdir()
Returns directory path used for temporary files */
PHP_FUNCTION(php_get_tmpdir)
{
RETURN_STRING((char *)php_get_temporary_directory(), 1);
}
/* }}} */
/*
* Local variables:
* tab-width: 4

View File

@@ -66,6 +66,7 @@ PHP_FUNCTION(fnmatch);
#endif
PHP_NAMED_FUNCTION(php_if_ftruncate);
PHP_NAMED_FUNCTION(php_if_fstat);
PHP_FUNCTION(php_get_tmpdir);
PHP_MINIT_FUNCTION(user_streams);