summaryrefslogtreecommitdiff
path: root/ext/standard/php_fopen_wrapper.c
diff options
context:
space:
mode:
authorWez Furlong <wez@php.net>2003-03-18 23:37:54 +0000
committerWez Furlong <wez@php.net>2003-03-18 23:37:54 +0000
commit86fb577d591b1b3f6fb5d752ba3912bcb6f6a704 (patch)
treeb54835962c33111ab65bd4634ecde9d6e685fdbd /ext/standard/php_fopen_wrapper.c
parent6a8765100606837933bf09ec7bde70e01b36cca9 (diff)
downloadphp-git-86fb577d591b1b3f6fb5d752ba3912bcb6f6a704.tar.gz
Implement persistent plain file streams.
Usage: php_stream *stream = php_stream_fopen("/path/to/file", "r+b", NULL, STREAM_OPEN_PERSISTENT | ENFORCE_SAFE_MODE | REPORT_ERRORS); the filename and mode are combined to form the hash key for the persistent list; they must be identical for this same stream to be returned again in the next request. Calling php_stream_close() on a persistent stream *will* close it, as is usual with all persistent resources in PHP/ZE. This is deliberately *not* exposed to user-space PHP at this time.
Diffstat (limited to 'ext/standard/php_fopen_wrapper.c')
-rw-r--r--ext/standard/php_fopen_wrapper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/php_fopen_wrapper.c b/ext/standard/php_fopen_wrapper.c
index 87ee5671df..74a765e059 100644
--- a/ext/standard/php_fopen_wrapper.c
+++ b/ext/standard/php_fopen_wrapper.c
@@ -218,7 +218,7 @@ php_stream * php_stream_url_wrap_php(php_stream_wrapper *wrapper, char *path, ch
return NULL;
}
- stream = php_stream_fopen_from_fd(fd, mode);
+ stream = php_stream_fopen_from_fd(fd, mode, NULL);
if (stream == NULL) {
close(fd);
}