mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
* Briefly document fourth zcontext parameter (does not yet close bug #17784)
* See also file(), fgets(), file_exists(), and is_readable(). * We mention 4.3.0 w/o stating it's not yet released * Minor textual changes git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@88682 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
7e46cf0e18
commit
d43ee1e467
1 changed files with 21 additions and 9 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.fopen">
|
||||
<refnamediv>
|
||||
|
@ -13,6 +13,7 @@
|
|||
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>mode</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>use_include_path</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>resource</type><parameter>zcontext</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<simpara>
|
||||
If <parameter>filename</parameter> begins with "http://" (not
|
||||
|
@ -23,17 +24,16 @@
|
|||
request in order to handle name-based virtual hosts.
|
||||
</simpara>
|
||||
<simpara>
|
||||
As of PHP 4.3.0 (not yet released), if you have compiled in
|
||||
support for OpenSSL, you may use "https://" to open an HTTP
|
||||
connection over SSL.
|
||||
As of PHP 4.3.0, if you have compiled in support for OpenSSL,
|
||||
you may use "https://" to open an HTTP connection over SSL.
|
||||
</simpara>
|
||||
<simpara>
|
||||
Note that the file pointer allows you to retrieve only the
|
||||
<emphasis>body</emphasis> of the response; to retrieve the HTTP
|
||||
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 (not yet released), the header information can
|
||||
be retrieved using the <function>file_get_wrapper_data</function>.
|
||||
As of PHP 4.3.0, the header information can be retrieved using
|
||||
the <function>file_get_wrapper_data</function>.
|
||||
</simpara>
|
||||
<simpara>
|
||||
HTTP connections are read-only; you cannot write data or copy
|
||||
|
@ -123,19 +123,25 @@
|
|||
</para>
|
||||
</note>
|
||||
<para>
|
||||
You can use the optional third parameter and set it to "1", if
|
||||
you want to search for the file in the <link
|
||||
linkend="ini.include-path">include_path</link>, too.
|
||||
The optional third <parameter>use_include_path</parameter> parameter
|
||||
can be set to '1' or &true; if you want to search for the file in
|
||||
the <link linkend="ini.include-path">include_path</link>, too.
|
||||
</para>
|
||||
<para>
|
||||
The optional fourth <parameter>zcontext</parameter> is used for
|
||||
specifying tuning parameters and callbacks.
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>fopen</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fp = fopen ("/home/rasmus/file.txt", "r");
|
||||
$fp = fopen ("/home/rasmus/file.gif", "wb");
|
||||
$fp = fopen ("http://www.example.com/", "r");
|
||||
$fp = fopen ("ftp://user:password@example.com/", "w");
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
|
@ -152,14 +158,20 @@ $fp = fopen ("ftp://user:password@example.com/", "w");
|
|||
<informalexample>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$fp = fopen ("c:\\data\\info.txt", "r");
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
<simpara>
|
||||
See also <function>fclose</function>,
|
||||
<function>fgets</function>,
|
||||
<function>fsockopen</function>,
|
||||
<function>file</function>,
|
||||
<function>file_exists</function>,
|
||||
<function>is_readable</function>,
|
||||
<function>socket_set_timeout</function>, and
|
||||
<function>popen</function>.
|
||||
</simpara>
|
||||
|
|
Loading…
Reference in a new issue