diff options
author | Dmitry Stogov <dmitry@php.net> | 2007-07-09 17:27:24 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2007-07-09 17:27:24 +0000 |
commit | 539f67ed8fc4af3084a0f7a0aea64f14a6b4d799 (patch) | |
tree | b82b94354887b9e7152400ee32e7ac15027f79bb /main/php_streams.h | |
parent | fe9a8266053de5e04468d2e276fbd277978dc1ef (diff) | |
download | php-git-539f67ed8fc4af3084a0f7a0aea64f14a6b4d799.tar.gz |
Added ability to create local or remote (URL) user streams
Local user streams must not be able to open(), URLs if allow_url_include is off
Implemented new function stream_is_local()
[
- stream_wrapper_register() extended with additional optional argument "flags"
of type long. This time only one flag is implemented
- STREAM_IS_URL, that means that userstream wrapper is remote (URL).
By default stream is local.
- stream_is_local() is a new function that accepts stream and tell if this
stream is local or remote (URL)
]
Diffstat (limited to 'main/php_streams.h')
-rwxr-xr-x | main/php_streams.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/main/php_streams.h b/main/php_streams.h index e4a56eacab..8f53384913 100755 --- a/main/php_streams.h +++ b/main/php_streams.h @@ -499,6 +499,9 @@ END_EXTERN_C() /* get (or create) a persistent version of the stream */ #define STREAM_OPEN_PERSISTENT 2048 +/* don't check allow_url_fopen and allow_url_include */ +#define STREAM_DISABLE_URL_PROTECTION 0x00002000 + /* Antique - no longer has meaning */ #define IGNORE_URL_WIN 0 @@ -550,6 +553,9 @@ PHPAPI HashTable *php_get_stream_filters_hash_global(); END_EXTERN_C() #endif +/* Definitions for user streams */ +#define PHP_STREAM_IS_URL 1 + /* * Local variables: * tab-width: 4 |