I have this uploader that i try to upload with but it just comes back at me and says it can not upload file, the permitions are set to alow anyone to write to the directory but it does not work, does anyone have a upload function that i can use.
function upload_file() {
global $userfile, $userfile_name, $userfile_size,
$userfile_type, $archive_dir, $WINDIR;
if(isset($WINDIR)) $userfile = str_replace("\\","\", $userfile);
$filename = basename($userfile_name);
if($userfile_size <= 0) die ("$filename is empty.");
if(!@copy($userfile, "$archive_dir/$filename"))
die("Can't copy $archive_dir/$userfile_name to $filename. Please hit back on your explorer or <br> <li id='list3'>Click the <a href='javascript:history.back(1)'>Back</a> button to try another link. </li>");
if(!isset($WINDIR) && !@unlink($userfile))
die ("Can't delete the file $userfile_name.");
echo "$filename has been successfully uploaded.<BR>";
echo "Filesize: " . number_format($userfile_size) . "<BR>";
echo "Filetype: $userfile_type<BR>";
}
?>
Thank you :d
😃 😃 😃