Jump to content

Echo RTF/ Word Document


designedfree4u

Recommended Posts

I'm  trying to echo a RTF Doc like Word. I can echo a .txt but when i echo a word doc "When i change to mccain.doc instead of mccain.txt" it's all charactors. Can this be done.

 

 

<?php
$file = "http://jaybirdfolio.com/News%20Template/TodaysNews/MainNews/mccain.txt";
$fp = fopen($file, "r");
while(!feof($fp)) {
$data = fgets($fp, 1024);
echo $newtext;
echo substr($data,0,80); // Echos first 80 characters
} 
fclose($fp); 
?> 

 

Thanks

 

Link to comment
https://forums.phpfreaks.com/topic/106982-echo-rtf-word-document/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.