Heim  >  Artikel  >  Backend-Entwicklung  >  调用WPS和ms office的COM组件时打开word文档有关问题

调用WPS和ms office的COM组件时打开word文档有关问题

WBOY
WBOYOriginal
2016-06-13 13:33:421870Durchsuche

调用WPS和ms office的COM组件时打开word文档问题
我想用WPS和ms office把office文档转换成pdf,excel和ppt都没问题,就是word文档在打开时就会出现服务器等待状态,进程里多了打开word的进程,需要自己手动关闭。
$office = new COM('WPS.Application');
$wps = $office->Documents->Open("D:/APMServ5.2.6/www/htdocs/pa.doc");//就是在执行这一句时出的问题

WPS和ms office 都试过,都会有这样的问题。
环境:win7+Apache

------解决方案--------------------
在 $office = new COM('WPS.Application'); 下面加一句
$office-》Visible = 0;
试试

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn