在 php 中将 .doc 转换为 html - 在 Windows 上调用 Abiword 时出现问题
我正在尝试让 AbiWord 程序为我完成这项工作,但似乎我没有在 php 中正确调用它。 我是根据这个问题的答案之一得出的: 将 .doc 转换为 php 中的 html
我想做的是使用 php 中的 exec() 函数执行 abiword 命令:
<?php
exec('AbiWord --to=html bpls.docx');
?>
它对我来说没有错误,所以我不知道这段代码有什么问题。我已经将 abi word bin 文件夹(AbiWord.exe 所在的位置)添加到 Windows 的环境变量中。
I'm trying to get AbiWord program to do the job for me but it seems I'm not calling it properly in php.
I've based it from one of the answers in this question:
Convert .doc to html in php
What I'm trying to do is to execute abiword command using the exec() function in php:
<?php
exec('AbiWord --to=html bpls.docx');
?>
It doesn't error on me so I do not know what's wrong with this code. I've already added the abi word bin folder(where AbiWord.exe is located) into the environment variables in windows.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
页面 http://www.abisource.com/wiki/AbiCommand 表示 AbiCommand 目前仅支持类 Unix 系统。因此,您需要找到 AbiWord 在 Windows 上接受哪些命令行选项(它们与类 UNIX 系统上的不同)并使用它们。可能类似于
AbiWord -h
或AbiWord /?
将为您提供选项列表The page http://www.abisource.com/wiki/AbiCommand says that AbiCommand at the moment supports only Unix-like systems. So, you need to find what command line options does AbiWord accepts on Windows (they are not the same as on unix-like systems) and use them instead. May be something like
AbiWord -h
orAbiWord /?
will give you list of options