direct download
Posted: Wed Apr 23, 2008 10:39 am
hi there,
can someone tell me how can i make a script 'index.php' that contain a direct link to download a file inside the same folder of 'index.php'.
like those links that you insert in your browser and immediatly appears a download windows without opening any page, i hope that you understand what i'm trying to do.
i have this in my 'index.php'
thanks in advance
can someone tell me how can i make a script 'index.php' that contain a direct link to download a file inside the same folder of 'index.php'.
like those links that you insert in your browser and immediatly appears a download windows without opening any page, i hope that you understand what i'm trying to do.
i have this in my 'index.php'
Code: Select all
header('Content-type: application/exe');
header('Content-Disposition: attachment; filename="file.exe"');
readfile('file.exe');