cvs: phpdoc-zh /appendices wrappers.xml

From: Date: Thu, 26 Sep 2002 09:37:40 +0000
Subject: cvs: phpdoc-zh /appendices wrappers.xml
Groups: php.doc.zh 
Request: Send a blank email to doc-zh+get-648@lists.php.net to get a copy of this message
dallas Thu Sep 26 05:37:40 2002 EDT Added files: /phpdoc-zh/appendices wrappers.xml Log: Partial file. Index: phpdoc-zh/appendices/wrappers.xml +++ phpdoc-zh/appendices/wrappers.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision:1.2 Maintainer: dallas Status: ready --> <appendix id="wrappers"> <title>Ö§³ÖµÄЭÒ飯·âװЭÒéÁбí</title> <para> ÒÔÏÂÊÇ PHP ÄÚÖÃÓÃÓÚÎļþϵͳº¯ÊýÀýÈç <function>fopen</function> ºÍ <function>copy</function> µÄ URL ·ç¸ñЭÒéÁÐ±í¡£³ýÁËÕâЩ·âװЭÒéÖ®Í⣬´Ó PHP 4.3 Æð£¬Ä㻹¿ÉÒÔÓà PHP ½Å±¾ºÍ <function>file_register_wrapper</function> д×Ô¼ºµÄ·âװЭÒé¡£ </para> <section id="wrappers.http"> <title>HTTP ºÍ HTTPS</title> <simpara>PHP 3£¬PHP 4¡£×Ô PHP 4.3 ÆðÖ§³Ö https://</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> </itemizedlist> <simpara> ÔÊÐíͨ¹ý HTTP 1.0 ʹÓà HTTP GET ·½·¨¶ÔÎļþ£¯×ÊÔ´½øÐÐÖ»¶Á·ÃÎÊ¡£Host: ±¨Í·Ò²»áͨ¹ýÇëÇó·¢ËͳöÈ¥ÒÔÖ§³Ö»ùÓÚÓòÃûµÄÐéÄâÖ÷»ú¡£Èç¹ûÄãÔÚ ini Îļþ»òÕßÁ÷ÉÏÏÂÎÄÅäÖÃÁË <link linkend="ini.user-agent">user_agent</link> ×Ö·û´®£¬Ò²»á±»°üÀ¨ÔÚÇëÇó±¨Í·ÖС£ </simpara> <simpara> ×Ô PHP 4.0.5 ÆðÖ§³ÖÖØ¶¨Ïò¡£Èç¹ûʹÓýÏÔç°æ±¾µÄ PHP ÔòÐèÒªÔÚ URL ĩβ°üÀ¨Ò»¸öбÏß¡£ </simpara> <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. Since PHP 4.3, the headers are available using <function>file_get_wrapper_data</function>. </simpara> <simpara> HTTP connections are read-only; you cannot write data or copy files to an HTTP resource. </simpara> <note> <simpara>HTTPS is supported starting from PHP 4.3, if you have compiled in support for OpenSSL. </simpara> </note> </section> <section id="wrappers.ftp"> <title>FTP ºÍ FTPS</title> <simpara>PHP 3£¬PHP 4¡£×Ô PHP 4.3 ÆðÖ§³Ö ftps://</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> </itemizedlist> <simpara> Allows read access to existing files and creation of new files via FTP. If the server does not support passive mode ftp, the connection will fail. </simpara> <simpara> You can open files for either reading or writing, but not both simultaneously. If the remote file already exists on the ftp server and you attempt to open it for writing, the connection will fail. If you need to update existing files over ftp, use <function>ftp_connect</function>. </simpara> <simpara> ftps:// was introduced in PHP 4.3. It is the same as ftp://, 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. </simpara> <note> <simpara>FTPS is supported starting from PHP 4.3, if you have compiled in support for OpenSSL. </simpara> </note> </section> <section id="wrappers.php"> <title>PHP input/output streams</title> <simpara>PHP 3.0.13 and up, php://output 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> </itemizedlist> <simpara> php://stdin, php://stdout and php://stderr 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>. </simpara> <simpara> php://stdin is read-only, whereas php://stdout, php://stderr and php://output 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> <itemizedlist> <listitem><simpara>zlib:</simpara></listitem> <listitem><simpara>compress.zlib://</simpara></listitem> <listitem><simpara>compress.bzip2://</simpara></listitem> </itemizedlist> <simpara> zlib: 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. </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. </simpara> </section> </appendix> <!-- 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 -->

« previous php.doc.zh (#648) next »