From: michiel <mi...@be...> - 2007-06-23 13:35:59
|
It looks like the php header function does not like the newline between Content-Type and Content-Length in PHP 5.16 if I do: header(rlib_get_content_type($rlib), true); rlib_spool($rlib); rlib_free($rlib); The header does not set correctly and PDF's are displayed as text in the browser However: $hh = rlib_get_content_type($rlib); $cl = strpos($hh, 'Content-Length'); $ctype_string = substr($hh,0,$cl); $clength_string = substr($hh, $cl); header(trim($ctype_string), true); header(trim($clength_string)); rlib_spool($rlib); rlib_free($rlib); It works fine! |