ms-word reading from PHP on linux O.S
| From: | Srinivasa Rao D | Date: | Mon, 23 Feb 2009 13:27:26 +0000 |
| Subject: | ms-word reading from PHP on linux O.S | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-288673@lists.php.net to get a copy of this message | ||
Hi all,
* How better, i can read ms-word doc files from PHP on LINUX OS*.On
searching I got *catdoc* softaware.By using this i can read word doc data as
a text.
function catdoc_file($fname)
{
$ret = exec('catdoc -ab '.escapeshellarg($fname) .' 2>&1');
if (preg_match('/^sh: line 1: catdoc/i',$ret)) {
return false;
}
return trim($ret);
}
It is working well.
*Is there are any other softwares that can fetch text from MS-WORD file?.*