Reply to Re: force download

Re: force download new!
by ray, 5 years, 3 months ago
Sorry, miss communication
i mean, i use code base on that code, but not working.

here my code
include('lib/class.upload.php');
$file = "image.jpg";
$files = "new-image.jpg";

$handle = new upload($file);
if ($handle->uploaded) {
 if ($handle->processed) {
	$handle->file_new_name_body   = $files;
	$handle->image_resize         = true;
	$handle->image_y              = 400;
	$handle->image_ratio_x        = true;
	header('Content-Type: application/octet-stream');
	header('Content-Disposition: attachment; filename='.basename($files));		
	$handle->process("$file");					
	echo $handle->Process();
	die();		
	
  } else {
	echo 'error : ' . $handle->error;
 }
}

that code download same image as original without modification.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