COM in PHP (winows only)
2018-09-07 13:34
阅读:282
找了很久,终于给我找到!哈哈哈...
//听说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支持.
上一篇:杏林同学录(五)
下一篇:一个ftp类(ini.php)
文章来自:搜素材网的编程语言模块,转载请注明文章出处。
文章标题:COM in PHP (winows only)
文章链接:http://soscw.com/index.php/essay/12707.html
文章标题:COM in PHP (winows only)
文章链接:http://soscw.com/index.php/essay/12707.html
评论
亲,登录后才可以留言!