Re: Problems downloading a PDF
| From: | Zoltán Németh | Date: | Wed, 04 Apr 2007 13:41:31 +0000 |
| Subject: | Re: Problems downloading a PDF | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-252040@lists.php.net to get a copy of this message | ||
2007. 04. 4, szerda keltezéssel 14.23-kor Mário Gamito ezt írta:
> Hi,
>
> > that's what I said before. you echo out some html before the file
> > headers. that will never work.
> > remove the echo statement on line 14 and you should be okay
> But i need the line
>
> echo "<a href=\"products-testudio.php?file=testudio.pdf\"",
> " rel=\"external\">Download TESTUDIO flyer</a>";
>
> to display the link for download!!!
you don't need that link in a downloaded file I'm sure.
so your script has 2 modes:
1. display the download link
2. send the downloaded file
so you should decide which mode is requested (for example by checking
for $_GET['file'] - if it is set, a file is requested, otherwise not)
and do the appropriate action for the request
greets
Zoltán Németh
>
> How can i sove this puzzle ?
>
> Full code follows my signature.
>
> Thanks for all your help guys.
>
> Warm Regards,