Re: displaying a pdf

From: Date: Sun, 29 May 2011 21:24:02 +0000
Subject: Re: displaying a pdf
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-313232@lists.php.net to get a copy of this message
Update. I re-arranged my code and now I get a popup saying "File does not begin with '%PDF-'. Here's the code as it is now. <?php session_start(); header("Cache-Control: no-cache"); header("Content-type: application/pdf"); $root = $_SERVER['DOCUMENT_ROOT']; $pdfname=$root.'/pdfs/myfile.pdf'; ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>|</title> </head> <body bgcolor="#c0c0c0"> </body> </html>

« previous php.general (#313232) next »