已经输出 Loaded Word, version 9.0 Version using Com_get(): 9.0 说明已经打开COM支持
我这里运行正常!应该是你OFFICE的问题。你重新安装OFFICE看看
看下面这个将word转换为HTML的实例是否成功,注意文件路径要正确: <? // starting word $word = new COM("word.application") or die("Unable to instanciate Word");// if you want see thw World interface the value must be '1' else '0' $word->Visible = 1;//doc file location $word->Documents->Open("d:/test.doc");//html file location '8' mean HTML format $word->Documents[1]->SaveAs("d:/test_doc.html",8);//closing word $word->Quit();//free the object from the memory $word->Release(); $word = null; ?>
Loaded Word, version 9.0 Version using Com_get(): 9.0
说明已经打开COM支持
<?
// starting word
$word = new COM("word.application") or die("Unable to instanciate Word");// if you want see thw World interface the value must be '1' else '0'
$word->Visible = 1;//doc file location
$word->Documents->Open("d:/test.doc");//html file location '8' mean HTML format
$word->Documents[1]->SaveAs("d:/test_doc.html",8);//closing word
$word->Quit();//free the object from the memory
$word->Release();
$word = null;
?>
我的配置:iis+php+mysql+winxp+office2000请问这问题跟配置有关吗?