Reply to Re: How to implement it with my existing code using move_uploaded_file

Re: How to implement it with my existing code using move_uploaded_file new!
by Chris, 7 years, 2 months ago
I have already an image uploader but I want to implement this class.upload

$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?Reply

Your reply

Name *
Email 
Title *
Text *
CAPTCHA image
Enter the code displayed on the image:
Click on the image to generate another one if it is hard to read it. The case is important