Re: Change in 5.2.1 re. parsing of URL

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

 



Lewis Kapell wrote:
> http://www.mydomain.com/mypage.php/phonypage.pdf
> 
> In this example there is a PHP script called mypage.php which serves
> up a PDF.  Putting the extra text at the end of the URL makes it
> appear to the user's browser that the URL ends with '.pdf' rather
> than '.php'.  We introduced this hack at my company because a few
> users were unable to view pages containing PDF or RTF content,
> presumably because of some combination of browser and/or firewall
> settings.

This is the proper way to handle this.  If it doesn't work, the user's
browser is misconfigured.

<?php
header('Content-type: application/pdf');
// your PDF data
?>

-- 
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