<?php

  Header("Content-Type: application/pdf ");
  Header("Content-Disposition: filename=miningsuplus-search-results.pdf ");
 readfile('/tmp/somefile.pdf');

?>

I use this to allow a user to download a pdf, most browser want to view it
in the browser, I wanted them to be able to save the file, not view / run
it. Is this what your looking for ?

--


Chris Lee
Mediawaveonline.com

em. [EMAIL PROTECTED]

ph. 250.377.1095
ph. 250.376.2690
fx. 250.554.1120


"Andris Jancevskis" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> My files are outside web server. These files can not be accessible
> from http://...., but anly user running web pages (nobody or IUSR_)
> have access. This limitation is to secure user files.
>
> My primary target is to deliver files to user using web browser. If I
> use require() or insert it is not possible in win32, but if file
> contains valid php code it is *very big* security hole.
>
> How to do this. Mime type tells to browser, wht to do.
> I can only display binary stream like text ...
>
> Could You know, how to send file like .dll, .exe, .php to client
> without executing on server-side?
>
> Andris
> mailto:[EMAIL PROTECTED]
>
> +---------------------------
> Wednesday, February 21, 2001, 5:43:51 PM, you wrote:
>
> > when your uploading a file
>
> No, some of these are uploaded, some not ...
>
> > [lee@server streaming]$ grep "pdf" /etc/mime.types
> > application/pdf                 pdf
> > [lee@server streaming]$
>
> > If your just curious of what a mime/type is without uploading it (I dont
> > think you are) then youve answered your own question.
>
> > "Files are on local disk. Not accessible from web server. "
>
> > if php can not access the files then how could it possibly ever find
this
> > files mime-type ?
>
> see above ...
>
> Andris
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to