I'm trying to output a .pdf file to screen.. and I have the following code that does not work:It does work if I remove the "session_start()" part. However, if I do this then I won't be able to set the $dir variable with my session values..Code:<?php header( "Content-Type: application/pdf" ); include('config.php'); session_start(); $dir = '/home3/gridops/reports/henri/TSR/test.pdf'; readfile("$dir"); >?
Anyone have any idea's? Is there a different way to output a .pdf file to screen besides linking to it directly? (I don't want the user to see where the file is located, so I am throwing a bunch of variables into the session and then calling the page that has this script.)