stream.constants.html
来自「php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容」· HTML 代码 · 共 395 行 · 第 1/2 页
HTML
395 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Predefined Constants</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="stream.resources.html">Stream Classes</a></div> <div class="next" style="text-align: right; float: right;"><a href="stream.filters.html">Stream Filters</a></div> <div class="up"><a href="book.stream.html">Streams</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div> <h1>Predefined Constants</h1> <p class="simpara">The constants below are defined by this extension, andwill only be available when the extension has eitherbeen compiled into PHP or dynamically loaded at runtime.</p> <p class="para"> <table class="informaltable"> <colgroup> <thead valign="middle"> <tr valign="middle"> <th colspan="1">Constant</th> <th colspan="1">Description</th> </tr> </thead> <tbody valign="middle" class="tbody"> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"><b><tt>STREAM_FILTER_READ</tt></b> *</td> <td colspan="1" rowspan="1" align="left"> Used with <a href="function.stream-filter-append.html" class="function">stream_filter_append()</a> and <a href="function.stream-filter-prepend.html" class="function">stream_filter_prepend()</a> to indicate that the specified filter should only be applied when <em class="emphasis">reading</em> </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"><b><tt>STREAM_FILTER_WRITE</tt></b> *</td> <td colspan="1" rowspan="1" align="left"> Used with <a href="function.stream-filter-append.html" class="function">stream_filter_append()</a> and <a href="function.stream-filter-prepend.html" class="function">stream_filter_prepend()</a> to indicate that the specified filter should only be applied when <em class="emphasis">writing</em> </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"><b><tt>STREAM_FILTER_ALL</tt></b> *</td> <td colspan="1" rowspan="1" align="left"> This constant is equivalent to <code class="code">STREAM_FILTER_READ | STREAM_FILTER_WRITE</code> </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"><b><tt>PSFS_PASS_ON</tt></b> *</td> <td colspan="1" rowspan="1" align="left"><i>Return Code</i> indicating that the userspace filter returned buckets in <i><tt class="parameter">$out</tt></i>. </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"><b><tt>PSFS_FEED_ME</tt></b> *</td> <td colspan="1" rowspan="1" align="left"><i>Return Code</i> indicating that the userspace filter did not return buckets in <i><tt class="parameter">$out</tt></i> (i.e. No data available). </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"><b><tt>PSFS_ERR_FATAL</tt></b> *</td> <td colspan="1" rowspan="1" align="left"><i>Return Code</i> indicating that the userspace filter encountered an unrecoverable error (i.e. Invalid data received). </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"><b><tt>STREAM_USE_PATH</tt></b></td> <td colspan="1" rowspan="1" align="left"><i>Flag</i> indicating if the <i>stream</i> used the include path. </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"><b><tt>STREAM_REPORT_ERRORS</tt></b></td> <td colspan="1" rowspan="1" align="left"><i>Flag</i> indicating if the <i>wrapper</i> is responsible for raising errors using <a href="function.trigger-error.html" class="function">trigger_error()</a> during opening of the stream. If this flag is not set, you should not raise any errors. </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"><b><tt>STREAM_CLIENT_ASYNC_CONNECT</tt></b> *</td> <td colspan="1" rowspan="1" align="left">Open client socket asynchronously. This option must be used together with the <b><tt>STREAM_CLIENT_CONNECT</tt></b> flag. Used with <a href="function.stream-socket-client.html" class="function">stream_socket_client()</a>. </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"><b><tt>STREAM_CLIENT_CONNECT</tt></b> *</td> <td colspan="1" rowspan="1" align="left">Open client socket connection. Client sockets should always include this flag. Used with <a href="function.stream-socket-client.html" class="function">stream_socket_client()</a>. </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"><b><tt>STREAM_CLIENT_PERSISTENT</tt></b> *</td> <td colspan="1" rowspan="1" align="left">Client socket opened with <a href="function.stream-socket-client.html" class="function">stream_socket_client()</a> should remain persistent between page loads. </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"><b><tt>STREAM_SERVER_BIND</tt></b> *</td> <td colspan="1" rowspan="1" align="left">Tells a stream created with <a href="function.stream-socket-server.html" class="function">stream_socket_server()</a> to bind to the specified target. Server sockets should always include this flag. </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"><b><tt>STREAM_SERVER_LISTEN</tt></b> *</td> <td colspan="1" rowspan="1" align="left">Tells a stream created with <a href="function.stream-socket-server.html" class="function">stream_socket_server()</a> and bound using the <b><tt>STREAM_SERVER_BIND</tt></b> flag to start listening on the socket. Connection-orientated transports (such as TCP) must use this flag, otherwise the server socket will not be enabled. Using this flag for connect-less transports (such as UDP) is an error. </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"><b><tt>STREAM_NOTIFY_RESOLVE</tt></b> *</td> <td colspan="1" rowspan="1" align="left"> A remote address required for this stream has been resolved, or the resolution failed. See <i><tt class="parameter">severity</tt></i> for an indication of which happened. </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"><b><tt>STREAM_NOTIFY_CONNECT</tt></b></td> <td colspan="1" rowspan="1" align="left"> A connection with an external resource has been established. </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"><b><tt>STREAM_NOTIFY_AUTH_REQUIRED</tt></b></td> <td colspan="1" rowspan="1" align="left"> Additional authorization is required to access the specified resource. Typical issued with <i><tt class="parameter">severity</tt></i> level of <b><tt>STREAM_NOTIFY_SEVERITY_ERR</tt></b>. </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"><b><tt>STREAM_NOTIFY_MIME_TYPE_IS</tt></b></td> <td colspan="1" rowspan="1" align="left"> The <i>mime-type</i> of resource has been identified, refer to <i><tt class="parameter">message</tt></i> for a description of the discovered type. </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"><b><tt>STREAM_NOTIFY_FILE_SIZE_IS</tt></b></td> <td colspan="1" rowspan="1" align="left"> The <i>size</i> of the resource has been discovered. </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"><b><tt>STREAM_NOTIFY_REDIRECTED</tt></b></td> <td colspan="1" rowspan="1" align="left"> The external resource has redirected the stream to an alternate location. Refer to <i><tt class="parameter">message</tt></i>. </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left"><b><tt>STREAM_NOTIFY_PROGRESS</tt></b></td> <td colspan="1" rowspan="1" align="left"> Indicates current progress of the stream transfer in <i><tt class="parameter">bytes_transferred</tt></i> and possibly
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?