Results 1 to 2 of 2

Thread: [RESOLVED] Read .doc file

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2007
    Posts
    912

    Resolved [RESOLVED] Read .doc file

    Hi
    im having problem in reading the .doc file in php my code is
    Code:
    <?php
    $fp = fopen("111.doc","r");
    $contents = fread($fp,filesize("111.doc"));
    echo $contents;
    ?>
    the output contain some characters at the begining and end of the file. Here is the output.
    Code:
    ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Word file starts from here. And this is more text, And this is more text, And this is more text, And this is more text, And this is more text, And this is more text, And this is more text, And this is more text, And this is more text, And this is more text, And this is more text, And this is more text, And this is more text, And this is more text, And this is more text, And this is more text, And this is more text, And this is more text, And this is more text, And this is more text, And this is more text, And this is more text, And this is more text, And this is more text, And this is more text, And this is more text, And this is more text, And this is more text, End of the word file ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Ø ��ì ��í
    Please help me to read the contents only and how to get rid of these other characters

  2. #2
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629

    Re: Read .doc file

    doc files are binary files, not text files: you have to find a doc parser.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width