Jump to content

Need help with downloading a file from the server


Amakki

Recommended Posts

Hello There  ,

 

I want to download a file from the server to the computer  .

 

 

How can i do this ??

 

i found out this code:

	
header("Content-type: image/jpg");
header("Content-Disposition: attachment; filename=test.jpg");

 

the problem is , what i get is the file that the code was executed from saved in the .jpg format.

 

how can i direct to a specified path to select a certain file then download it .

 

example

let's say i have a folder that contains 2 files:

download.php and image.jpg

 

how can i download the image.jpg from the server with the Save As window??

 

Thank You

 

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.