opening a word document in php (.doc)
I want to open a .doc file and print out using php (or only count lines and words). I tried with the COM library, but it didn't work (I'm using linux server). I also tried installing Antiword
but it doesn't work, because in my server safe_mode=off
and i can't change it.
Are there any solution, how can I open and view this file or simple count how 开发者_JAVA百科many lines or words does it have?
Install catdoc
on your server and use shell_exec
to invoke it. With the converted plain text you can do your word and line counts.
精彩评论