当前位置:编程学习 > php >>

COM in PHP (winows only)

找了很久,终于给我找到!哈哈哈...  
//听说php(做为现在的主流开发语言)4也已经支持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();   
?>  
注意:先用php(做为现在的主流开发语言)info()看看你的机器是否打开了COM支持.  
补充:Web开发 , php ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,