View Single Post
  #1 (permalink)  
Old 09-02-2006, 02:19 PM
mischievous_honey08's Avatar
mischievous_honey08 mischievous_honey08 is offline
Member
 
Join Date: Jul 2006
Posts: 34
mischievous_honey08 is on a distinguished road
iTrader: (0)
Exclamation Help : Uploading File Error

Hello guys,

My bf had a problem with his code in uploading file.. I include here the codes.. Could anyone please take a look with this code and tell me what is the error. Thank you in advance.

His message:
Quote:
hi! im trying to upload a file and send a confirmation to site owner that a user has uploaded a file, i have set the folders into full permission but
why am i getting this error::::

Warning: copy(public_html/uploads/SWORD.jpg): failed to open stream: No such file or directory

is there something wrong with the scripts????

Code:
$tempname = str_replace(" ","_",$_FILES['uploadedfile']['name']); $destination_file = "uploads/".$tempname; $source_file = $_FILES['uploadedfile']['tmp_name'] ; if(copy($source_file, $destination_file)) { $msg = "Uploaded $source_file to $ftp_server as $destination_file"; $address = $_SESSION['current_user']; $fname = $_SESSION['first_name']; $lname = $_SESSION['last_name']; $filename = $tempname; mail("email@email.com", "File Upload by $fname $lname", "http://www.domain.net/uploads/".$filename, "From: domain.com" ); }else{ $msg = "Upload Failed! Please try or check path of file to be uploaded."; }


Thank you
Reply With Quote