1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184
|
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Author: Wez Furlong <wez@thebrainroom.com>
Please contact me before making any major amendments to the
content of this section. Splitting/Merging are fine if they are
required for php-doc restructuring purposes - just drop me a line
if you make a change (so I can update my local copy).
-->
<sect1 id="streams.constants">
<title>Streams Constants</title>
<refentry id="streams.options">
<refnamediv>
<refname>Stream open options</refname>
<refpurpose>Affects the operation of stream factory functions</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<para>
One or more of these values can be combined using the OR operator.
<variablelist>
<varlistentry>
<term>
<constant>IGNORE_PATH</constant>
</term>
<listitem>
<simpara>
This is the default option for streams; it requests that the include_path is
not to be searched for the requested file.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>USE_PATH</constant>
</term>
<listitem>
<simpara>
Requests that the include_path is to be searched for the requested file.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>IGNORE_URL</constant>
</term>
<listitem>
<simpara>
Requests that registered URL wrappers are to be ignored when opening the
stream. Other non-URL wrappers will be taken into consideration when
decoding the path. There is no opposite form for this flag; the streams
API will use all registered wrappers by default.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>IGNORE_URL_WIN</constant>
</term>
<listitem>
<simpara>
On Windows systems, this is equivalent to IGNORE_URL.
On all other systems, this flag has no effect.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>ENFORCE_SAFE_MODE</constant>
</term>
<listitem>
<simpara>
Requests that the underlying stream implementation perform safe_mode
checks on the file before opening the file. Omitting this flag will skip
safe_mode checks and allow opening of any file that the PHP process
has rights to access.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>REPORT_ERRORS</constant>
</term>
<listitem>
<simpara>
If this flag is set, and there was an error during the opening of the file
or URL, the streams API will call the php_error function for you. This
is useful because the path may contain username/password information
that should not be displayed in the browser output (it would be a
security risk to do so). When the streams API raises the error, it first
strips username/password information from the path, making the error
message safe to display in the browser.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>STREAM_MUST_SEEK</constant>
</term>
<listitem>
<simpara>
This flag is useful when your extension really must be able to randomly
seek around in a stream. Some streams may not be seekable in their
native form, so this flag asks the streams API to check to see if the
stream does support seeking. If it does not, it will copy the stream
into temporary storage (which may be a temporary file or a memory
stream) which does support seeking.
Please note that this flag is not useful when you want to seek the
stream and write to it, because the stream you are accessing might
not be bound to the actual resource you requested.
</simpara>
<note>
<simpara>
If the requested resource is network based, this flag will cause the
opener to block until the whole contents have been downloaded.
</simpara>
</note>
</listitem>
</varlistentry>
<varlistentry>
<term>
<constant>STREAM_WILL_CAST</constant>
</term>
<listitem>
<simpara>
If your extension is using a third-party library that expects a FILE* or
file descriptor, you can use this flag to request the streams API to
open the resource but avoid buffering. You can then use
<function>php_stream_cast</function> to retrieve the FILE* or
file descriptor that the library requires.
</simpara>
<simpara>
The is particularly useful when accessing HTTP URLs where the start
of the actual stream data is found after an indeterminate offset into
the stream.
</simpara>
<simpara>
Since this option disables buffering at the streams API level, you
may experience lower performance when using streams functions
on the stream; this is deemed acceptable because you have told
streams that you will be using the functions to match the underlying
stream implementation.
Only use this option when you are sure you need it.
</simpara>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
</refentry>
</sect1>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
|