RE: [PHP] Delivering NAMED pdf files

From: Date: Fri, 19 Oct 2001 17:27:44 +0000
Subject: RE: [PHP] Delivering NAMED pdf files
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-71605@lists.php.net to get a copy of this message
George, your best bet is to have a table in your database which looks up the name of the file, based on a more friendly name. James . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Politicalia admin and editor e: james@politicalia.com :: w: http://www.politicalia.com/ Today's Discussion, Tomorrow's Agenda. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . > -----Original Message----- > From: George Pitcher [mailto:fmdev@yahoo.co.uk] > Sent: Friday, October 19, 2001 2:42 PM > To: MrBaseball34; php-general@lists.php.net > Subject: Re: [PHP] Delivering NAMED pdf files > > > Yes, > > If I download the file as it is named, it is the file I expected, only not > named the way I wanted. > > George > > "MrBaseball34" <mrbaseball34@hotmail.com> wrote in message > news:MPG.1639e82085267290989683@news.php.net... > > > > > > 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); > > > ?> > > > > Have you CHECKED the value of $fp? > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: php-general-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > _________________________________________________________ > 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: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#71605) next »