www.webdeveloper.com
Results 1 to 2 of 2

Thread: PHP How to read doc (microsoft word) file?

  1. #1
    Join Date
    May 2007
    Posts
    26

    PHP How to read doc (microsoft word) file?

    Hi everybody,

    Does anybody know if there is a way of reading a doc file via php?

    Something like fopen("test.doc", "r")...

    I have used the above but the result is some weird symbols on the screen... the same ones you get when the file is binary.

    So, I guess that's the case. So, how can someone read a binary file via php?
    Is it possible?

    Thanks.

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    18,933
    If you are on a Windows server that has MS Word installed, you could probably use the COM functions to open it and manipulate it. Otherwise you could search the web for a PHP MS Word script or class (or that might be easier even if COM is an option). For example: http://www.phpclasses.org/browse/package/3553.html
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles