Jump to content

Reading ms word doc from linux shell script


balas

Recommended Posts

hi

 

i have used this following script in the linux system to read the ms doc (Say Resume) files. It is working fine in the terminal mode and displaying the output content of the ms word, but the same script doesnt bring the output in browser to display in web page. Is there any solution?

 

<?

 

function catdoc_file($fname)

{

$ret = shell_exec('catdoc -ab '.escapeshellarg($fname) .' 2>&1');

 

if (preg_match('/^sh: line 1: catdoc/i',$ret)) {

echo "err";

return false;

}

return trim($ret);

}

 

//echo catdoc_string("sfdsf");

echo $a=catdoc_file("resume.doc");

 

?>

 

Thanks

Bala

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.