spires Posted August 18, 2006 Share Posted August 18, 2006 Hi, Does any one know why: when i click a link to download (page1)the link throws me to the download page (page2 see * code)then throws me back to page one?even if i:click a link to download (page1)throws me to a jump page (page2). which, using a header locationthrows me to the download page (page3 see * code)then throws me back to page one?why does it always comeback to page one?thanks for any help on this. :)*[code]$dir = '../cart/mp31/'; $file = $dir.$_REQUEST['userfile_name1'];header("Pragma: public");header("Expires: 0");header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header('Content-length: '.filesize($file));header("Content-Type: application/force-download");header( "Content-Disposition: attachment; filename=".basename($file));header( "Content-Description: File Transfer");@readfile($file);[/code] Link to comment https://forums.phpfreaks.com/topic/17975-forced-download/ Share on other sites More sharing options...
spires Posted August 18, 2006 Author Share Posted August 18, 2006 I hope i haven't wrote it to confussing for everyone. My English aint to good. Link to comment https://forums.phpfreaks.com/topic/17975-forced-download/#findComment-76906 Share on other sites More sharing options...
ryanlwh Posted August 18, 2006 Share Posted August 18, 2006 because of the "attachement", it opens a popup without trying to open the download page in the browser Link to comment https://forums.phpfreaks.com/topic/17975-forced-download/#findComment-76930 Share on other sites More sharing options...
spires Posted August 18, 2006 Author Share Posted August 18, 2006 Thanks for the reply.Do you know if there is any way around this. I want it to go:page 1 (link to download)Page 2 (jump page)Page 3 (download page)then stop at page 2Can this be done? Link to comment https://forums.phpfreaks.com/topic/17975-forced-download/#findComment-76938 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.