Jump to content

Can any one tel me how to read.doc file


anushka

Recommended Posts

I havent personally tried reading a .doc file, but I really suggest that you'll change the .doc to a .rtf, .txt, or other unformatted text file. The junkdata you are getting MIGHT be the .doc files other 'non relevant' information, such as formatting, columns, colors, indentation and so on.

 

If this didn't help, post a bit more information. Good luck!

Link to comment
Share on other sites

this the code which i have written to read the file called abc.doc,But i am not able to read the content which is there in the file abc.doc

<?php

 

 

$fp = fopen("abc.doc", "rb");

$text = fread($fp,1024);

echo $text;

 

?>

 

Link to comment
Share on other sites

can i convert .doc file to  .txt file internally through programing.

 

I suppose so, but not with a 'language' like PHP, that would require a 'lower-level' language. I'm not qualified to answer that question, but I'm sure it involves a good bit of knowledge.

 

If you can't read the contents of the .doc file I'd suggest looking for alternatives to reading it, or just trying to recreate it on a .txt file (if possible).

 

Either way, .doc is not an acceptable format.

Link to comment
Share on other sites

That's good to know, anushka. Thanks.

 

I wonder if I can stir up any tutorials on converting .doc to .txt behind-the-scenes. If anyone can find one before me, please post it here.

 

It would be pretty useful to allow users to upload .doc's.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.