juneshi Posted October 8, 2006 Share Posted October 8, 2006 HI sir, i have a download file, now, when i click download button, it will open a middle php page, this page contain download counts and download file,then return download file. download.php -> middle php file (---------)->download.phpmy code in middle page:<?phpheader("Content-type: application/octet-stream");header("Content-Disposition: attachment; filename=aaa.exe");header("Location: download.php");?>but, there's no effect in these download code, when i comment the last code, it can download it. how should i do it?thanks. Quote Link to comment Share on other sites More sharing options...
juneshi Posted October 10, 2006 Author Share Posted October 10, 2006 any one knows? Quote Link to comment Share on other sites More sharing options...
printf Posted October 10, 2006 Share Posted October 10, 2006 reverse the logic, download.php,then middle.php. You can't redirect after a header ( download file );. So show download.php with your information, then include a meta refresh that points to middle.php!me! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.