当前位置:首页 > 操作系统 > Windows

在php中如何使用com(仅适合windows系统)

//听说php4也已经支持java/EJB的说.
// this script is come from zend. :)
$Word = new COM("word.application") or die("Unable to instanciate Word
");
PRint "Loaded Word, version {$word->Version}n";
$word->Visible = 1;
$word->Documents->Add();
$word->Selection->TypeText("This is a test...");
$word->Documents[1]->SaveAs("Useless test.doc");
$word->Quit();
?>
注意:先用phpinfo()看看你的机器是否打开了COM支持.

以上就介绍了在php中如何使用com(仅适合windows系统),包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!

相关教程推荐

其他课程推荐