Start New Discussion within our Web Development Community

Hello Community,
I was wondering if there is a way to goto the direct link of a file (eg. 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.

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");


This question has already been answered. Start a new discussion instead.