Forum Moderators: coopster
=====================================================
function DownloadFile($file)
{
if (file_exists($file))
{
$filesize = @filesize($file);
header('Content-Disposition: attachment; filename="' . $file . '"');
readfile($file);
return;
}
}
DownloadFile("filename");
=====================================================
Before the file begins to download, the user is prompted with a "File Download" alert that reads:
Some files can harm your computer. If the file information looks suspicious, or you do not fully trust the source, do not open or save this file.
Then it asks if the user wants to open the file or save it to their computer, providing 4 buttons: Open, Save, Cancel, More Info.
Are there any parameters that I can set in my program to stop this alert from popping up?
Thanks