Accessing pdf file thru php

From: Date: Wed, 12 Sep 2001 09:57:14 +0000
Subject: Accessing pdf file thru php
Groups: php.general 
Request: Send a blank email to php-general+get-67030@lists.php.net to get a copy of this message
Hi all, I'm trying to build php into an existing solution which uses Lasso. I have tested the passing of data from Lasso to php and that works fine. I want Lasso to pass the filename over to a php page and for that page to grab the file from a folder outside of the webroot and push it out to the user, at the same time as presenting them with a confirmation form so that downloading can be confirmed. I have tried the following code without any good results: <?php $filename="D:\\Pdf\\0226138097(57-77).pdf"; $len = filesize($filename); $header=" Content-type: application/pdf Content-type: application/x-octet-stream Content-Disposition: inline; filename=D:\\Pdf\\0226138097(57-77).pdf Content-Length: $len"; header=($header); readfile($filename); ?> I get a parse error on the line that calls the header. Can anyone help me with this please? Regards George Pitcher Technical Manager HERON Project Napier University Edinburgh EH10 5DT fmdev@yahoo.co.uk gep1@stir.ac.uk safc2_1nufc@yahoo.com http://www.heron.ac.uk ================================================ programmer - A device for transmuting caffeine into code. ================================================ _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com

« previous php.general (#67030) next »