Re: Browse and Upload file

From: Date: Thu, 14 Feb 2002 05:18:31 +0000
Subject: Re: Browse and Upload file
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-84701@lists.php.net to get a copy of this message
On Wed, 2002-02-13 at 19:18, Reuben D Budiardja wrote: > Yes, I have. I follow the example exactly from > http://www.php.net/manual/en/features.file-upload.php. Well, that's the problem then. The example in the manual is buggy. :) This was fixed in cvs earlier today, actually, but the online manual hasn't been regenerated yet, so it hasn't shown up online. It'll be visible (meaning the correct example) within a few days. See below... > Here is my scripts: > > uploadPic.php: > <HTML> > > <form enctype="multipart/form-data" action="uploadPic2.php" > method="post"> > <input type="hidden" name="MAX_FILE_SIZE" value="100000"> > Send this file: <input name="userfile" type="file"> > <input type="submit" value="Send File"> > </form> > > </HTML> > > uploadPic2.php: > <? > print_r($HTTP_POST_FILES); > move_uploaded_file($HTTP_POST_FILES['userfile'], "/home/web/final"); The above line should read: move_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'], "/home/web/final/some_file_name.jpg"); Hope this clears it up for you. Torben > ?> > > Thanks a lot for helping me. > Reuben D. Budiardja > > > -- Torben Wilson <torben@php.net> http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506

« previous php.general (#84701) next »