diff --git a/features/remote-files.xml b/features/remote-files.xml index 9443fbf469..f5ef108260 100644 --- a/features/remote-files.xml +++ b/features/remote-files.xml @@ -1,18 +1,23 @@ - + Using remote files - As long as support for the "URL fopen wrapper" is enabled when - you configure PHP (which it is unless you explicitly pass the - flag to configure (for versions - up to 4.0.3) or set allow_url_fopen 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 require - and include statements. + As long as allow_url_fopen 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 include, + include_once, require and + require_once statements. + + + In PHP 4.0.3 and older, in order to use URL wrappers, you were required + to configure PHP using the configure option + . + + @@ -55,8 +60,13 @@ fclose($file); - 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 fopen will + fail. + + To connect as a user other than 'anonymous', you need to specify the username (and possibly password) within the URL, such as 'ftp://user:password@ftp.example.com/path/to/file'. (You can use the @@ -85,11 +95,11 @@ fclose ($file); - 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 - syslog. + 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 fopen call will + fail if the remote file already exists. To do distributed logging + like that, you should take a look at syslog.