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. Link to comment https://forums.phpfreaks.com/topic/23329-download-count-and-download-file-in-php/ Share on other sites More sharing options...
juneshi Posted October 10, 2006 Author Share Posted October 10, 2006 any one knows? Link to comment https://forums.phpfreaks.com/topic/23329-download-count-and-download-file-in-php/#findComment-106577 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! Link to comment https://forums.phpfreaks.com/topic/23329-download-count-and-download-file-in-php/#findComment-106583 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.