Give a destination file name, not just the directory. You don't have to unlink($file), it's done automatically when the script ends.
---John Holmes... ----- Original Message ----- From: "Dani" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, May 25, 2002 7:58 PM Subject: [PHP] UPLOADING IMAGE > What's wrong with my code? > > <?php > if($file) > { > print("file name :$file_name<P>\n"); > if (copy($file,"http://sarjito/img/")) > { > print("file uploaded"); > } > unlink($file); > } > ?> > > Any advise is welcome. > > Thanks, > Dani > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php