launching a pdf <SOLVED>
Posted: Fri Oct 19, 2007 8:55 am
I'm trying to launch a pdf file that's listed in my database - file is pure php no html involved
If I paste what var_dump returns in my browser it pulls up the correct pdf file. Have I left out something for the Header function?
TIA
Code: Select all
$row = mysql_fetch_array($result1);
extract($row);
$firstpart="Location: http://www.whathesees.net";
$folderforfile="/stories/";
$filetoshow=$firstpart.$folderforfile.$nameofnote;
/* using var_dump to insure correct file name */
var_dump($filetoshow);
/* var_dump returns --- correct path and file - string(60) "Location: http://www.whathesees.net/stories/sakeleavesus.pdf" */
header('Content-type: application/pdf');
header($filetoshow)
exit;TIA