diff --git a/features/file-upload.xml b/features/file-upload.xml index 5c7623a9ce..f9c708dfbe 100644 --- a/features/file-upload.xml +++ b/features/file-upload.xml @@ -1,5 +1,5 @@ - + Handling file uploads @@ -460,46 +460,11 @@ foreach ($_FILES["pictures"]["error"] as $key => $error) { PUT method support - - PUT method support has changed between PHP 3 and PHP 4. - In PHP 4, one should use the standard input stream to read - the contents of an HTTP PUT. - - - Saving HTTP PUT files with PHP 4 - - -]]> - - - - - - All documentation below applies to PHP 3 only. - - - - PHP provides support for the HTTP PUT method used by clients such - as Netscape Composer and W3C Amaya. - PUT requests are much simpler - than a file upload and they look something like this: + PHP provides support for the HTTP PUT method used by some clients to store + files on a server. + PUT requests are much simpler than a file upload using POST requests + and they look something like this: This tells Apache to send all PUT requests for URIs that match the - context in which you put this line to the put.php script. This + context in which you put this line to the put.php script. This assumes, of course, that you have PHP enabled for the .php - extension and PHP is active. + extension and PHP is active. The destination resource for all PUT + requests to this script has to be the script itself, not a filename the + uploaded file should have. - Inside your put.php file you would then do something like this: + With PHP 4 and following you would then do something like the following in + your put.php. This would copy the contents of the uploaded file to the + file myputfile.ext on the server. + You would probably want to perform some checks and/or + authenticate the user before performing this file copy. - + + Saving HTTP PUT files with PHP 4 + + +]]> + + + + + + All documentation below applies to PHP 3 only. + + + + + Saving HTTP PUT files with PHP 3 + ]]> - + + - This would copy the file to the location requested by the remote - client. You would probably want to perform some checks and/or - authenticate the user before performing this file copy. The only + The only trick here is that when PHP sees a PUT-method request it stores the uploaded file in a temporary file just like those handled by the