Well, now, I get an unknown file type.  I have already specified the
application type.  This was yesterday.  Today, I get the file type as
'Acrobat Control for Active X'.  That doesn't look right...  Oh well...
Will have to play around and see what can I do to make it work better.  A
couple of months ago, I worked on making hte downloading and/or opening the
executable file from the website and had this similiar problem.  What helped
me to solve this problem is not to use the readfile() function, but with
fopen() instead.  We had customers calling about problem with downloading
but we got fewer customers calling us if I use the fopen() function instead.
I put in more header script and it also reduced the problem for IE user.
Then finally solved most of the problem by putting in the exit() function at
the end of hte header script.  It seem that IE don't know how to tell if the
downloading or opening/running had begun.  Kind of suck, though....

"Kevin Stone" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I'm sorry but it can't be done.  You cannot output a file without printing
it to the output buffer.  You cannot print a file to the output buffer
without opening the file into memory.  You cannot open a file into memory
without using a function like fopen() or readfile().  It's as simple as
that.
>
> There must be something wrong with Internet Explorer on your end.  Corrupt
files perhaps?  Try installing the latest update, or use system restore to
go back a few weeks, or reinstall the components from the Windows CD.
That's my best advice.  But I guarentee this is not a PHP problem and that
there is no work around for it other than to fix what's wrong on your
system.  Good luck.
>
> Once everything is working you will see the PDF open in the browser plugin
when you set the Content-type header.  And you should see a download prompt
when you set the Content-disposition header.
>
> - Kevin
>
> "Scott Fletcher" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> > I can't do readfile() because of lots of bug in IE (Internet
Explorer)....
> >
> > "Kevin Stone" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> > > Forget the content length and disposition headers.  Just set the
content
> > type then output the file..
> > >
> > > header("Content-type: application/pdf");
> > > readfile("junk.pdf");
> > >
> > > - Kevin
> > >
> > > "Scott Fletcher" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> > > > I seem to be having problem with sending the PDF document to the
browser
> > to
> > > > be open on screen.  I kept getting the error message, it say
'Windows
> > cannot
> > > > open this file'.  Here's my sample script, so what am I doing
wrong?...
> > > >
> > > > --snip--
> > > >     header("Content-Type: application/pdf");
> > > >     header("Content-Length: '40736'");
> > > >     header("Content-Disposition: inline; filename='junk.pdf'");
> > > > --snip--
> > > >
> > > > Thanks,
> > > >  Scott F.
> > >
>

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

Reply via email to