|
Posted by GooderThanYou on 12/21/05 21:59
header('Content-Description: File Transfer');
header('Content-Type: application/msword');
header('Content-Length: ' . filesize($file));
header('Content-Disposition: attachment; filename=test.doc');
$file = 'test.rtf';
$text = $_POST['secondary'];
$fp = fopen ($file, 'r');
$output = fread( $fp, filesize($file));
fclose($fp);
$output = str_replace('<<COMMENTS>>', $text, $output);
echo $output;
I have an RTF using IFRAME and it works beautfiully, just this code,
everything is fine and perfect except the <<COMMENTS>> is replaced with
something similiar to this:
ab<STRONG>cdefghji</STRONG>jklmnop
when it opens the file as an RTF, if you echo $text string on the web
page it is bold and the way it should be... any ... umm suggestions?
Thanks
[Back to original message]
|