James,

I can. The text in square brackets is a pdf filename referenced in full from
a Filemaker database using Lasso.

<Form action="fileaccess.php" method="post">
    <input type=hidden name="fp" value="[field:'Doc_filename']">
    <input type="Submit" value="Download PDF file">
</form>

And the php page which is fileaccess.php:

<?php
$fp1 = "D:\\Pdf\\" . $fp;
$len = filesize($fp1);
header("Content-Type: application/pdf");
header("Content-Disposition: inline; filename=$fp1");
header("Content-Length: $len");
readfile($fp1);
?>

HTH

George
----- Original Message -----
From: "James Cox" <[EMAIL PROTECTED]>
To: "George Pitcher" <[EMAIL PROTECTED]>; "Php-General@Lists. Php. Net"
<[EMAIL PROTECTED]>
Sent: Friday, October 19, 2001 12:45 PM
Subject: RE: [PHP] Delivering NAMED pdf files


> can you paste the full text of the code as you have it? I don't see
anywhere
> where you define the name of the file.
>
> James Cox
>
> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
> .
> Politicalia admin and editor
> e: [EMAIL PROTECTED]  :: w: http://www.politicalia.com/
> Today's Discussion, Tomorrow's Agenda.
>  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
> .
>
>
> > -----Original Message-----
> > From: George Pitcher [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, October 19, 2001 12:27 PM
> > To: speedboy; [EMAIL PROTECTED]
> > Subject: Re: [PHP] Delivering NAMED pdf files
> >
> >
> > Thanks for the [non] suggestion.
> >
> > I will not host these in a web-accessable directory. They are copyright
> > materials.
> >
> > I've done this type of hosting previously using Frontier on a Mac and it
> > worked fine.
> >
> > I thought that php was better than Frontier, though.
> >
> > George
> > ----- Original Message -----
> > From: "speedboy" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, October 19, 2001 12:27 PM
> > Subject: Re: [PHP] Delivering NAMED pdf files
> >
> >
> > > > Thanks for the suggestion but it didn't change anything.
> > >
> > > It won't. Put them in a web accessible directory and don't use custom
> > header calls because they do not work reliably.
> > >
> > >
> > > --
> > > 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]
> >
> >
> > _________________________________________________________
> > Do You Yahoo!?
> > Get your free @yahoo.com address at http://mail.yahoo.com
> >
> >
> > --
> > 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]
> >


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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