Re: File Upload
| From: | Gerard Samuel | Date: | Mon, 30 Jul 2001 00:58:22 +0000 |
| Subject: | Re: File Upload | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-60136@lists.php.net to get a copy of this message | ||
Phil, thats why you get the big bucks.
Dammit, I was messing around with this all day.
Thanks it works now.....
Gerard
Philip Murray wrote:
Quoting Gerard Samuel <trini0@optonline.net>:Hey all, Im running freebsd 4.3, apache 1.3.20, mysq.3.23.39, php 4.0.6. Im trying to figure out file uploading. If I echo $pic, $pic_name, $pic_size, $pic_type, after the form is submitted, everything echoes correctly. In my script I have ==> $archive_dir = "/files/www/data/archive"; $filename = basename($pic_name); if (!copy($pic, "$archive/$filename"))Shouldn't that be if( !copy( $pic, "$archive_dir/$filename" ) );echo "Error: $filename cannot be uploaded."; else echo "Successfully uploaded $filename."; When I submit the form, it outputs ==> Error: Dscf0005.jpg cannot be uploaded. I chmoded the folder to 777 and still the same results.It's always the simple things. :)