mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-22 03:48:55 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@97308 c90b9560-bf6c-de11-be94-00142212c4b1
120 lines
3.9 KiB
XML
120 lines
3.9 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.1 $ -->
|
|
<refentry id="function.stream-get-meta-data">
|
|
<refnamediv>
|
|
<refname>stream_get_meta_data</refname>
|
|
<refpurpose>Retrieves header/meta data from streams/file pointers</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>array</type><methodname>file_get_meta_data</methodname>
|
|
<methodparam><type>resource</type><parameter>stream</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<simpara>
|
|
Returns information about an existing <parameter>stream</parameter>.
|
|
The stream can be any stream created by <function>fopen</function>,
|
|
<function>fsockopen</function> and <function>pfsockopen</function>.
|
|
The result array contains the following items:
|
|
</simpara>
|
|
<itemizedlist>
|
|
<listitem>
|
|
<para>
|
|
<parameter>timed_out</parameter> (bool) - &true; if the stream
|
|
timed out while waiting for data on the last call to
|
|
<function>fread</function> or <function>fgets</function>.
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
<parameter>blocked</parameter> (bool) - &true; if the stream is
|
|
in blocking IO mode. See <function>socket_set_blocking</function>.
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
<parameter>eof</parameter> (bool) - &true; if the stream has reached
|
|
end-of-file. Note that for socket streams this member can be &true;
|
|
even when <parameter>unread_bytes</parameter> is non-zero. To
|
|
determine if there is more data to be read, use
|
|
<function>feof</function> instead of reading this item.
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
<parameter>unread_bytes</parameter> (int) - the number of bytes
|
|
currently contained in the read buffer.
|
|
</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
<simpara>
|
|
The following items were added in PHP 4.3:
|
|
</simpara>
|
|
<itemizedlist>
|
|
<listitem>
|
|
<para>
|
|
<parameter>stream_type</parameter> (string) - a label describing
|
|
the underlying implementation of the stream.
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
<parameter>wrapper_type</parameter> (string) - a label describing
|
|
the protocol wrapper implementation layered over the stream.
|
|
See <xref linkend="wrappers"/> for more information about wrappers.
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
<parameter>wrapper_data</parameter> (mixed) - wrapper specific
|
|
data attached to this stream. See <xref linkend="wrappers"/> for
|
|
more information about wrappers and their wrapper data.
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
<parameter>filters</parameter> (array) - and array containing
|
|
the names of any filters that have been stacked onto this stream.
|
|
Filters are currently undocumented.
|
|
</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
<note>
|
|
<para>
|
|
This function was introduced in PHP 4.3, but prior to this version,
|
|
<function>socket_get_status</function> could be used to retrieve
|
|
the first four items, for <emphasis>socket based streams only</emphasis>.
|
|
</para>
|
|
<para>
|
|
In PHP 4.3 and later,
|
|
<function>socket_get_status</function> is an alias for this function.
|
|
</para>
|
|
</note>
|
|
<note>
|
|
<simpara>This function does NOT work on sockets created by the <link
|
|
linkend="ref.sockets">Socket extension</link>.
|
|
</simpara>
|
|
</note>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<!-- 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
|
|
-->
|