PHP How to read doc (microsoft word) file?
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?
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
How to Ask Questions the Smart Way
(not affiliated with this site, but well worth reading)
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)