class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
more info about the class
See all posts Reply
$newname= (rand(1, 99999999999).".".$file_ext); $dir_separator = DIRECTORY_SEPARATOR; $folder = "uploads"; $uploaddate = date("M-d-Y"); $destination_path = dirname(__FILE__).$dir_separator.$folder.$dir_separator.$uploaddate.$dir_separator; if(!is_dir($destination_path)) mkdir($destination_path); $target_path = $destination_path.$newname; move_uploaded_file($file_tmp, $target_path); if(empty($file_name) == false){ $file_location = "/".$uploaddate."/".$newname; } else { $file_location = ""; }
So, from this code how can I implement/adjust this?