$word = new COM("word.application") or die("不能创建word对像!"); $word->Visible = 0; $word->Documents->Open("D:\\wwwroot\\phpcode\\htdocs\\test\\".$ZBXMBH."\zbgg.doc"); $content=$word->Documents[1]->content->text; echo $content; 以上代码在php4.2.3下测试通过,php4.3.2下面会出现Warning: (null)(): Type library value emptyenum is already defined and has a different value提示,但仍能打出结果
$word = new COM("word.application") or die("不能创建word对像!");
$word->Visible = 0;
$word->Documents->Open("D:\\wwwroot\\phpcode\\htdocs\\test\\".$ZBXMBH."\zbgg.doc");
$content=$word->Documents[1]->content->text;
echo $content;
以上代码在php4.2.3下测试通过,php4.3.2下面会出现Warning: (null)(): Type library value emptyenum is already defined and has a different value提示,但仍能打出结果