1.11M Members

Download Not Load

 
0
 

Hello Community,
I was wondering if there is a way to goto the direct link of a file (eg. http://example.com/files/test.txt) and for it to download insted of loading and displaying the file.
I want to do this for every file in the "files" folder and only that folder.

 
0
 

after searching I found this

header("Content-Disposition: attachment; filename=\"" . basename($File) . "\"");
header("Content-Type: application/force-download");
header("Content-Length: " . filesize($File));
header("Connection: close");

HERE

 
0
 

What do i add this to?

Question Answered as of 1 Year Ago by OsaMasw
You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: