php://input documented, <filename> tags added

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@101366 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Hartmut Holzgraefe 2002-10-25 21:31:03 +00:00
parent 738f0499a9
commit 65dc8610b3

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.5 $ -->
<!-- $Revision: 1.6 $ -->
<appendix id="wrappers">
<title>List of Supported Protocols/Wrappers</title>
<para>
@ -13,17 +13,17 @@
<section id="wrappers.http">
<title>HTTP and HTTPS</title>
<simpara>PHP 3, PHP 4. https:// since PHP 4.3</simpara>
<simpara>PHP 3, PHP 4. <filename>https://</filename> since PHP 4.3</simpara>
<itemizedlist>
<listitem><simpara>http://example.com</simpara></listitem>
<listitem><simpara>http://user:password@example.com</simpara></listitem>
<listitem><simpara>https://example.com</simpara></listitem>
<listitem><simpara>https://user:password@example.com</simpara></listitem>
<listitem><simpara><filename>http://example.com</filename></simpara></listitem>
<listitem><simpara><filename>http://user:password@example.com</filename></simpara></listitem>
<listitem><simpara><filename>https://example.com</filename></simpara></listitem>
<listitem><simpara><filename>https://user:password@example.com</filename></simpara></listitem>
</itemizedlist>
<simpara>Allows read-only access to files/resources via HTTP 1.0,
using the HTTP GET method. A Host: header is sent with the request
using the HTTP GET method. A <literal>Host:</literal> header is sent with the request
to handle name-based virtual hosts. If you have configured
a <link linkend="ini.user-agent">user_agent</link> string using
your ini file or the stream context, it will also be included
@ -37,7 +37,7 @@
<simpara>
The stream allows access to the <emphasis>body</emphasis> of
the resource; the headers are stored in the
<parameter>$http_response_header</parameter> variable.
<varname>$http_response_header</varname> variable.
Since PHP 4.3, the headers are available using
<function>stream_get_meta_data</function>.
</simpara>
@ -54,13 +54,13 @@
<section id="wrappers.ftp">
<title>FTP and FTPS</title>
<simpara>PHP 3, PHP 4. ftps:// since PHP 4.3</simpara>
<simpara>PHP 3, PHP 4. <filename>ftps://</filename> since PHP 4.3</simpara>
<itemizedlist>
<listitem><simpara>ftp://example.com/pub/file.txt</simpara></listitem>
<listitem><simpara>ftp://user:password@example.com/pub/file.txt</simpara></listitem>
<listitem><simpara>ftps://example.com/pub/file.txt</simpara></listitem>
<listitem><simpara>ftps://user:password@example.com/pub/file.txt</simpara></listitem>
<listitem><simpara><filename>ftp://example.com/pub/file.txt</filename></simpara></listitem>
<listitem><simpara><filename>ftp://user:password@example.com/pub/file.txt</filename></simpara></listitem>
<listitem><simpara><filename>ftps://example.com/pub/file.txt</filename></simpara></listitem>
<listitem><simpara><filename>ftps://user:password@example.com/pub/file.txt</filename></simpara></listitem>
</itemizedlist>
<simpara>
@ -76,7 +76,8 @@
use <function>ftp_connect</function>.
</simpara>
<simpara>
ftps:// was introduced in PHP 4.3. It is the same as ftp://,
<filename>ftps://</filename> was introduced in PHP 4.3.
It is the same as <filename>ftp://</filename>,
but attempts to negotiate a secure connection with the ftp server.
If the server does not support SSL, then the connection falls back
to regular unencrypted ftp.
@ -91,53 +92,69 @@
<section id="wrappers.php">
<title>PHP input/output streams</title>
<simpara>PHP 3.0.13 and up, php://output since PHP 4.3</simpara>
<simpara>
PHP 3.0.13 and up, <filename>php://output</filename>
and <filename>php://input</filename> since PHP 4.3
</simpara>
<itemizedlist>
<listitem><simpara>php://stdin</simpara></listitem>
<listitem><simpara>php://stdout</simpara></listitem>
<listitem><simpara>php://stderr</simpara></listitem>
<listitem><simpara>php://output</simpara></listitem>
<listitem><simpara><filename>php://stdin</filename></simpara></listitem>
<listitem><simpara><filename>php://stdout</filename></simpara></listitem>
<listitem><simpara><filename>php://stderr</filename></simpara></listitem>
<listitem><simpara><filename>php://output</filename></simpara></listitem>
<listitem><simpara><filename>php://input</filename></simpara></listitem>
</itemizedlist>
<simpara>
php://stdin, php://stdout and php://stderr allow access to
<filename>php://stdin</filename>, <filename>php://stdout</filename>
and <filename>php://stderr</filename> allow access to
the corresponding input or output stream of the PHP process.
</simpara>
<simpara>
php://output allows you to write to the output buffer mechanism
in the same way as <function>print</function> and
<function>echo</function>.
<filename>php://output</filename> allows you to write to the
output buffer mechanism in the same way as
<function>print</function> and <function>echo</function>.
</simpara>
<simpara>
php://stdin is read-only, whereas php://stdout, php://stderr
and php://output are write-only.
<filename>php://input</filename> allows you to read raw POST data.
It is a less memory intensive alternative to
<varname>$HTTP_RAW_POST_DATA</varname> and does not need any
special &php.ini; dicetives.
</simpara>
<simpara>
<filename>php://stdin</filename> and
<filename>php://input</filename> are read-only, whereas
<filename>php://stdout</filename>,
<filename>php://stderr</filename> and
<filename>php://output</filename> are write-only.
</simpara>
</section>
<section id="wrappers.compression">
<title>Compression Streams</title>
<simpara>zlib: PHP 4.0.4 - PHP 4.2.3 (systems with fopencookie only)</simpara>
<simpara>compress.zlib:// and compress.bzip2:// PHP 4.3 and up</simpara>
<simpara><filename>zlib:</filename> PHP 4.0.4 - PHP 4.2.3 (systems with fopencookie only)</simpara>
<simpara><filename>compress.zlib://</filename> and <filename>compress.bzip2://</filename> PHP 4.3 and up</simpara>
<itemizedlist>
<listitem><simpara>zlib:</simpara></listitem>
<listitem><simpara>compress.zlib://</simpara></listitem>
<listitem><simpara>compress.bzip2://</simpara></listitem>
<listitem><simpara><filename>zlib:</filename></simpara></listitem>
<listitem><simpara><filename>compress.zlib://</filename></simpara></listitem>
<listitem><simpara><filename>compress.bzip2://</filename></simpara></listitem>
</itemizedlist>
<simpara>
zlib: works like <function>gzopen</function>, except that the
<filename>zlib:</filename> works like <function>gzopen</function>, except that the
stream can be used with <function>fread</function> and the other
filesystem functions. This is deprecated as of PHP 4.3 due
to ambiguities with filenames containing ':' characters; use
compress.zlib:// instead.
<filename>compress.zlib://</filename> instead.
</simpara>
<simpara>
compress.zlib:// and compress.bzip2:// are equivalent to
<function>gzopen</function> and <function>bzopen</function> respectively,
and operate even on systems that do not support fopencookie.
<filename>compress.zlib://</filename> and
<filename>compress.bzip2://</filename> are equivalent to
<function>gzopen</function> and <function>bzopen</function>
respectively, and operate even on systems that do not support
fopencookie.
</simpara>
</section>
</appendix>