php实现word转html文档卡死的问题
2015-10-16 17:13
741 查看
在执行php上传转换word为html时,时常会卡死,文件上传不上去
执行多次以后我发现是因为
function word2html($wordname,$htmlname) { $word = new COM("word.application") or die("Unable to instanciate Word"); $word->Visible = 1; $word->Documents->Open($wordname); $word->Documents[1]->SaveAs($htmlname,8); $word->Quit(); $word = null; unset($word); } word2html('D:/www/test/6.docx','D:/www/test/6.html');
执行多次以后我发现是因为
$word->Documents->Open($wordname);上面这句,遇到这种情况以后,需要的服务器端的任务管理器的进程服务中,关闭winword.exe进程,或者把文件改名,才能转换成功。
相关文章推荐
- php实现word转html文档的例子
- Yii 执行模型save方法时数据为空
- PHP函数之error_reporting()详细说明
- 菜菜鸟Zend Framework 2 不完全学习涂鸦(三)-- 例子功能设置
- 菜菜鸟Zend Framework 2 不完全学习涂鸦(二)-- 类库共享
- 菜菜鸟Zend Framework 2 不完全学习涂鸦(一)-- 安装配置
- php手册之static
- PHP删除数组中重复的元素
- Thinkphp 框架模板变量及模板输出
- PHP页面跳转与页面重定向详解
- listener.ora中PLSExtPro 和ExtProc的作用(转)
- WIN7 使用VS2012编译PHP扩展库
- php 语言包的实现
- Web Server、CGI、PHP-CGI、FastCGI和php-fpm之间的关系
- iframe实现无刷新上传文件并在当前页面返回数据php处理方式
- 驼峰命名法和下划线风格的互转
- php ajax提交数据 在本地可以执行,而在服务器不能执行
- 为什么要使用RTP
- 从Yii2的Request看其CSRF防范策略
- php 魔术方法 重载