Results 1 to 2 of 2

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

  1. #1
    Join Date
    May 2007

    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?


  2. #2
    Join Date
    Aug 2004
    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
    "Well done....Consciousness to sarcasm in five seconds!" ~ Terry Pratchett, Night Watch

    How to Ask Questions the Smart Way (not affiliated with this site, but well worth reading)

    My Blog
    cwrBlog: simple, no-database PHP blogging framework

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