开发者

opening a word document in php (.doc)

开发者 https://www.devze.com 2023-04-04 20:44 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消