You are here: Re: Php Download script problem! « PHP Programming Language « IT news, forums, messages
Re: Php Download script problem!

Posted by C16 on 10/13/05 23:49

Many thanks Chuck that did the trick. For interest the header I have that
works is now:

header("Cache-Control: post-check=0, pre-check=0");
header("Expires: 0");
header('Content-Description: File Transfer');
header("Content-Type: " . $xtype);
header("Content-Length: " . $filesize);
header('Content-Disposition: inline; filename=' . basename($filename));

> Here's what works for me. I haven't tested your case with IE but you might
> give it a try.
>
> header('Content-Description: File Transfer');
> header('Content-Type: application/pdf');
> header('Content-Length: ' . filesize($file));
>
> // to download
> header('Content-Disposition: attachment; filename=' . basename($file));
>
> // to open in browser
> //header('Content-Disposition: inline; filename=' . basename($file));
>
> readfile($file);
>
> --
> *****************************
> Chuck Anderson • Boulder, CO
> http://www.CycleTourist.com
> Integrity is obvious.
> The lack of it is common.
> *****************************

 

Navigation:

[Reply to this message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация