Php script to read msword file

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
rajsekar2u
Forum Commoner
Posts: 71
Joined: Thu Nov 20, 2008 4:23 am

Php script to read msword file

Post by rajsekar2u »

hi,

I need to read a msword file and i want to print the contents in that word file.

i used the fgets() and its working for text file. but its not working for word file.

Help me in this.

Thanks in advance
guosheng1987
Forum Newbie
Posts: 24
Joined: Thu Oct 15, 2009 3:03 am

Re: Php script to read msword file

Post by guosheng1987 »

use com

$word = new COM("word.application") or die(" can not open com object");

more details use google
Mark Baker
Forum Regular
Posts: 710
Joined: Thu Oct 30, 2008 6:24 pm

Re: Php script to read msword file

Post by Mark Baker »

COM will only work if your server is running on a Windows server, with MS Word installed.

You don't mention which version of Word. If it's word 2007, you could always look at PHPdocx for a pure PHP solution
Post Reply