cvs: phpdoc /en/features remote-files.xml

From: Date: Sun, 11 Aug 2002 11:01:18 +0000
Subject: cvs: phpdoc /en/features remote-files.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969347978@lists.php.net to get a copy of this message
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 &quot;URL fopen wrapper&quot; 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:password@ftp.example.com/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>

« previous php.doc (#969347978) next »