Originally I posted this in the php help, but no one seems to have any answeres so here is the original post:
Hi, Im having some problems with the passthru function. When I just have the passthru fuction like this
header( \'Content-Type: application/pdf\' );
header( \'Content-Location: /local/relateive/pathname/agian/correct.pdf\' );
$fh = fopen(\"/correct_fullSystemPathname/yep/double/checked.pdf\", \"r\");
This is the only thing in my file. When I add the session start
at the beggining where it belongs, the passthru ceases to work. Instead of bringing up the pdf in the browser, like it was doing before the sessions, it asks for a download. However when you select to download it just says it is unable to open from the web site. It appears its trying to open the php file rather than letting the server \"serve the output\" of the php file.
Ok any help would be greatly appreciated.
Continuing to play with this thing I have found that the correct file is being called, and the download is initiallizing correctly... in fact by tricking the browser I could actually view the binary for the pdf that was being passed. The problem must be in the way the file is being presented. Probably some header I am missing. Any Ideas?
Thanks for any help!!!
1 reply to this topic
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users