<? //$filename="http:\\192.168.0.37\SagnikResumeFull.doc"; $word = @new COM("word.application") or die("Unable to instantiate Word"); $word->Documents->Open($filename); $new_filename = substr($filename,0,-4) . ".txt"; // the '2' parameter specifies saving in txt format $word->Documents[1]->SaveAs($new_filename,2); $word->Documents[1]->Close(false); $word->Quit(); $word->Release(); $word = NULL; unset($word); $fh = fopen($new_filename, 'r'); // this is where we exit Hell $contents = fread($fh, filesize($new_filename)); fclose($fh); unlink($new_filename); ?> why this script is not opening the word application. Do we need to install COM.
Let's suppose you are running on win server ... why the filename is commented ? //$filename="http:\\192.168.0.37\SagnikResumeFull.doc";