在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
php里的com类可以操作window系统上的东西
例如:可以在本地打开一个word文档,然后写入东西,只用于window系统
需要加载php_com_dotnet.dll模块
1 $word = new COM("word.application") or die("Unable to instantiate Word"); 2 echo "Loaded Word, version {$word->Version}\n"; 3 4 //bring it to front 5 $word->Visible = 1; 6 7 //open an empty document 8 $word->Documents->Add(); 9 10 //do some weird stuff 11 $word->Selection->TypeText("This is a test..."); 12 $word->Documents[1]->SaveAs("Useless test.doc"); 13 14 //closing word 15 $word->Quit(); 16 17 //free the object 18 $word = null;
|
2022-08-17
2022-11-06
2022-07-18
2022-08-17
2022-08-15
请发表评论