Peter wrote:
Hi all, I'm just trying to send a rtf file to the browser but firefox
and IE just display raw rtf content (with tags and so on)...
I used this code down below:
--CODE
$length = strlen($new_rtf);
$filename = "certificato_".$paz.".rtf";
header("Content-Type: application/rtf");
header("Content-Length: ".$length);
header("Content-Disposition:attachment; filename=\"".$filename."\"");
echo($new_rtf);
--END
Actually it's in a page with no HTML tags, I don't know if this is an
error or what...Can anybody help me?
You can recommend dispositions, but the browser is free to ignore them.
However, in your case, I suspect something else is going on. First of
all, enable all errors and display them - in your php.ini file, put:
display_errors=on
error_reporting=E_ALL
And restart your web server.
If that doesn't show anything, look at the headers being sent by the web
server - the "Live HTTP Headers" add-on for Firefox is great in this
respect.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================