文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>PHP生成word文档

PHP生成word文档

时间:2010-03-19  来源:wusiliang

<?PHP
$word = new COM("word.application") or die("Can't start Word!");

// print the version of Word that's now in use
echo "Loading Word, v. {$word->Version}";


// set the visibility of the application to 0 (false)
// to open the application in the forefront, use 1 (true)
$word->Visible = 0;

// create a new document in Word
$word->Documents->Add();


// add text to the new document
$word->Selection->TypeText("Testing 1-2-3...");


//save the document in the Windows temp directory
$word->Documents[1]->SaveAs("C:\comtest.doc");


// close the connection to the COM component
$word->Quit();
相关阅读 更多 +
排行榜 更多 +
建筑模拟器最新版

建筑模拟器最新版

模拟经营 下载
素人改造师最新版

素人改造师最新版

模拟经营 下载
外星战士幸存者手机版

外星战士幸存者手机版

飞行射击 下载