From:             cindylu at jdbarnes dot com
Operating system: Linux
PHP version:      4.3.0
PHP Bug Type:     PDF related
Bug description:  Can not display PDF file on screen using @readfile($pdfFile)

If I create a test.php file with the following code, I put that test.php on
the website. the code will show the pdf on the screen. It works ok.
<?php
header("Content-Type: application/pdf");
@readfile($pdfFile);
?>

But if I put  these few lines of code in my php, it does not show the pdf
file on the screen.
<?php
$pdffile = myCreatePDF_function($myHTML);
//I know my pdf file is created, because if I stop here, I can see my pdf
file and I can use my test.php to show my pdf file on screen.
//But if I put the code in here. It does not work.
header("Content-Type: application/pdf");
@readfile($pdfFile);
exit();
?>

Can anyone tell me why?

Any comments are highly appreciated.

Cindy
-- 
Edit bug report at http://bugs.php.net/?id=23054&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=23054&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=23054&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=23054&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=23054&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=23054&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=23054&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=23054&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=23054&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=23054&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=23054&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23054&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=23054&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=23054&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=23054&r=gnused

Reply via email to