Re: header()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



But you can design the script to redirect to a page with a JavaScript to 
open a file(PDF) by using the target="_new" and then it redirects to the 
home page.

CJ

"Matthew Weier O'Phinney" <matthew@xxxxxxxxxx> wrote in message 
news:slrnd5t2a5.frg.matthew@xxxxxxxxxxxxxxxxxxxxxxxx
>* Martín Marqués <martin@xxxxxxxxxxxxxxx>:
>> I'm having a bit of a problem understanding how the header() sends the 
>> HTTP
>> headers.
>>
>> Here's what I want to do:
>>
>> 1) Send a PDF file which will be printed in the client (the client will 
>> read
>> it and print it if he wants to.
>> 2) Redirect to the main page of the aplication.
>
> You can't do both; you can do one or the other. A Location header will
> always redirect, even if a content-type has been sent.
>
> -- 
> Matthew Weier O'Phinney           | WEBSITES:
> Webmaster and IT Specialist       | http://www.garden.org
> National Gardening Association    | http://www.kidsgardening.com
> 802-863-5251 x156                 | http://nationalgardenmonth.org
> mailto:matthew@xxxxxxxxxx         | http://vermontbotanical.org 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux