You are here: Text in rtf document is always tagged in html...little snippet of code to look at « All PHP « IT news, forums, messages
Text in rtf document is always tagged in html...little snippet of code to look at

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация