From b8e2058366ccb503679aec54aebd61622a1039c0 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Mon, 16 Sep 2002 18:13:37 +0000 Subject: [PATCH] Document ftps:// and add a table listing supported wrappers to the appendices. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@95901 c90b9560-bf6c-de11-be94-00142212c4b1 --- appendices/wrappers.xml | 117 +++++++++++++++++++++++ reference/filesystem/functions/fopen.xml | 14 ++- 2 files changed, 128 insertions(+), 3 deletions(-) create mode 100644 appendices/wrappers.xml diff --git a/appendices/wrappers.xml b/appendices/wrappers.xml new file mode 100644 index 0000000000..d4303f3c26 --- /dev/null +++ b/appendices/wrappers.xml @@ -0,0 +1,117 @@ + + + + List of Supported Protocols/Wrappers + + The following is a list of the various URL style protocols that + PHP has built-in for use with the filesystem functions such as + fopen and copy. + In addition to these wrappers, as of PHP 4.3, you can write + your own wrappers using PHP script and + file_register_wrapper. + + + URL Wrappers + + + + Protocol + Versions + Description + + + + + http:// + All + Allows read-only access to files/resources via HTTP. + + + https:// + PHP 4.3 and up, with SSL support + Allows read-only access to files/resources via SSL secured + HTTP. + + + + ftp:// + All + Allows read access to existing files and creation of new files + via FTP. + + + + ftps:// + PHP 4.3 and up, with SSL support + The same as ftp://, but uses SSL when supported by the FTP server. + + + php://stdin + PHP 3.0.13 and up + Allows read acess to the standard input stream of the PHP process. + + + php://stdout + PHP 3.0.13 and up + Allows write acess to the standard output stream of the PHP process. + + + php://stderr + PHP 3.0.13 and up + Allows write acess to the standard error stream of the PHP process. + + + php://output + PHP 4.3 and up + Allows write acess to the output buffer mechanism, just like + echo and print. + + + + zlib: + PHP 4.0.4 - PHP 4.2.3, systems with fopencookie only + Works like gzopen, except that the + stream can be used with fread and the other + filesystem functions. This is deprecated as of PHP 4.3 due + to ambiguities with filenames containing ':' characters; use + compress.zlib:// instead. + + + + compress.zlib:// + PHP 4.3 and up + Works just like gzopen, even on systems + without fopencookie. + + + + compress.bzip2:// + PHP 4.3 and up + Works just like bzopen. + + + + +
+
+
+ diff --git a/reference/filesystem/functions/fopen.xml b/reference/filesystem/functions/fopen.xml index c557f155fb..2c0f9bf264 100644 --- a/reference/filesystem/functions/fopen.xml +++ b/reference/filesystem/functions/fopen.xml @@ -1,5 +1,5 @@ - + @@ -33,7 +33,7 @@ response header you need to be using PHP 4.0.5 or later; The headers will be stored in the $http_response_header variable. As of PHP 4.3.0, the header information can be retrieved using - the file_get_wrapper_data. + file_get_wrapper_data. HTTP connections are read-only; you cannot write data or copy @@ -54,6 +54,13 @@ If you need to update existing files over ftp, use ftp_connect. + + As of PHP 4.3.0, if you have compiled in support for OpenSSL, + you may use "ftps://" to open an FTP connection that will + use SSL to encrypt the connection. PHP will fall-back and + work just like regular ftp:// if the server does not support + SSL. + If filename is one of "php://stdin", "php://stdout", or "php://stderr", the corresponding stdio @@ -166,7 +173,8 @@ $fp = fopen ("c:\\data\\info.txt", "r"); - See also fclose, + See also + fclose, fgets, fsockopen, file,