also, here is a good one to try.

build yourself an error document that gets called when a file that cannot
befound is looked for.

Then in this error document, you perform a check on the file/script name
that was called.  If it happens to end with .pdf, then you could assume that
it is going to be a pdf that needs to be displayed.  Then you get the name
of the file called and look for it in your directory that contains all your
pdf's.  If you find a file in there by the same name, then you can use
readfile or some other file reader to pass the file through.

This should take care of the problem.  You might also need to send back some
specific headers to tell the browser what you are sending it, but it should
work even without that being done.

Jim Lucas

----- Original Message ----- 
From: "Jason Wong" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 18, 2003 2:01 AM
Subject: Re: [PHP] This is my fourth day of hitting this brick wall!
Anyone...Purleeeeese help!


> On Thursday 18 September 2003 16:24, Steve Jackson wrote:
> > I know a few have already done this on the list but I have read articles
> > on Zend tried other functions done everything I can, de-bugged till I'm
> > blue in the face and still haven't been able to solve this.
> >
> > I need to protect files by leaving them outside the web root.
> > I call them up ok. (the link is get.php?file=EventNotifcation_01.pdf)
> > I can download the file fine by right clicking the link in the browser
> > and saving it to disk.
> > My problem is I can't view it inline. IE in the browser. It's a PDF file
> > so I should be able to.
>
> [snip]
>
> Have you tried the obvious, such as using browsers other than IE? Or a
> different version of IE?
>
> Fact is that there are versions of IE that have broken mime handling.
>
> -- 
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
> ------------------------------------------
> Search the list archives before you post
> http://marc.theaimsgroup.com/?l=php-general
> ------------------------------------------
> /*
> modem, adj.:
> Up-to-date, new-fangled, as in "Thoroughly Modem Millie."  An
> unfortunate byproduct of kerning.
>
> [That's sic!]
> */
>
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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

Reply via email to