Jump to content

Archived

This topic is now archived and is closed to further replies.

spires

forced download.

Recommended Posts

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 location
throws 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]

Share this post


Link to post
Share on other sites
I hope i haven't wrote it to confussing for everyone.
My English aint to good.

Share this post


Link to post
Share on other sites
because of the "attachement", it opens a popup without trying to open the download page in the browser

Share this post


Link to post
Share on other sites
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 2

Can this be done?

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.