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

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

WBOY
WBOYOriginal
2016-06-13 13:33:421913browse

调用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;
试试

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn