wez Sun Aug 11 07:01:18 2002 EDT
Modified files:
/phpdoc/en/features remote-files.xml
Log:
Make it a little bit easier to read.
Index: phpdoc/en/features/remote-files.xml
diff -u phpdoc/en/features/remote-files.xml:1.18
phpdoc/en/features/remote-files.xml:1.19
--- phpdoc/en/features/remote-files.xml:1.18 Sun Jun 16 03:11:01 2002
+++ phpdoc/en/features/remote-files.xml Sun Aug 11 07:01:18 2002
@@ -1,18 +1,23 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.18 $ -->
+<!-- $Revision: 1.19 $ -->
<chapter id="features.remote-files">
<title>Using remote files</title>
<para>
- As long as support for the "URL fopen wrapper" is enabled when
- you configure PHP (which it is unless you explicitly pass the
- <option>--disable-url-fopen-wrapper</option> flag to configure (for versions
- up to 4.0.3) or set <parameter>allow_url_fopen</parameter> to off in &php.ini;
- (for newer versions)),
- you can use HTTP and FTP URLs with most functions that take a
- filename as a parameter, including the <function>require</function>
- and <function>include</function> statements.
- </para>
+ As long as <parameter>allow_url_fopen</parameter> is enabled in
+ php.ini, you can use HTTP and FTP URLs with most of the functions
+ that take a filename as a parameter. In addition, URLs can be
+ used with the <function>include</function>,
+ <function>include_once</function>, <function>require</function> and
+ <function>require_once</function> statements.
+ </para>
+ <note>
+ <para>
+ In PHP 4.0.3 and older, in order to use URL wrappers, you were required
+ to configure PHP using the configure option
+ <option>--enable-url-fopen-wrapper</option>.
+ </para>
+ </note>
<para>
<note>
<para>
@@ -55,8 +60,13 @@
</example>
</para>
<para>
- You can also write to files on an FTP as long you connect as a user
- with the correct access rights, and the file doesn't exist already.
+ You can also write to files on an FTP server (provided that you
+ have connected as a user with the correct access rights). You
+ can only create new files using this method; if you try to overwrite
+ a file that already exists, the <function>fopen</function> will
+ fail.
+ </para>
+ <para>
To connect as a user other than 'anonymous', you need to specify
the username (and possibly password) within the URL, such as
'ftp://user:[EMAIL PROTECTED]/path/to/file'. (You can use the
@@ -85,11 +95,11 @@
<para>
<note>
<para>
- You might get the idea from the example above to use this
- technique to write to a remote log, but as mentioned above, you
- can only write to a new file using the URL fopen() wrappers. To
- do distributed logging like that, you should take a look at
- <function>syslog</function>.
+ You might get the idea from the example above that you can use
+ this technique to write to a remote log file. Unfortunately
+ that would not work because the <function>fopen</function> call will
+ fail if the remote file already exists. To do distributed logging
+ like that, you should take a look at <function>syslog</function>.
</para>
</note>
</para>
--
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php