File Upload

From: Date: Mon, 30 Jul 2001 00:30:09 +0000
Subject: File Upload
Groups: php.general 
Request: Send a blank email to php-general+get-60130@lists.php.net to get a copy of this message
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")) 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. What could be wrong? How does one copy the temp file to a specified directory? Thanks much Gerard

« previous php.general (#60130) next »