Hi,
I have a script which prompts user to download a file. The code looks like this
header(“Pragma: public”);
header(“Expires: 0”); // set expiration time
header(“Cache-Control: must-revalidate, post-check=0, pre-check=0”);
header(“Content-length: “.filesize(”$filepath));
header(“Content-type: $mime”);
header(‘Content-Transfer-Encoding: binary’);
header('Content-Disposition: attachment; filename=”‘.$some_name.’"');
readfile($filename);
exit(0);
With this script download dialog box appears and we can download or save files from browser. But when the file is being download, the site hangs i.e. no other pages can be navigated. Site just stays on the similar page. If anyone has idea on this, please let me know.
Thank you