Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/244.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在php中将.doc转换为html-在Windows上调用Abiword时出现问题_Php_Html_Windows_Doc_Abiword - Fatal编程技术网

在php中将.doc转换为html-在Windows上调用Abiword时出现问题

在php中将.doc转换为html-在Windows上调用Abiword时出现问题,php,html,windows,doc,abiword,Php,Html,Windows,Doc,Abiword,我试图让AbiWord程序为我做这项工作,但似乎我没有在php中正确调用它。 我是根据这个问题的一个答案得出的: 我尝试使用php中的exec()函数执行abiword命令: <?php exec('AbiWord --to=html bpls.docx'); ?> 它对我没有错误,所以我不知道这个代码有什么问题。我已经将abi word bin文件夹(AbiWord.exe所在的位置)添加到windows中的环境变量中。页面上说abi命令目前只支持类Unix系统。因此,您需

我试图让AbiWord程序为我做这项工作,但似乎我没有在php中正确调用它。 我是根据这个问题的一个答案得出的:

我尝试使用php中的exec()函数执行abiword命令:

<?php
exec('AbiWord --to=html bpls.docx');
?>


它对我没有错误,所以我不知道这个代码有什么问题。我已经将abi word bin文件夹(AbiWord.exe所在的位置)添加到windows中的环境变量中。

页面上说abi命令目前只支持类Unix系统。因此,您需要找到AbiWord在Windows上接受哪些命令行选项(它们与在类unix系统上不同),并使用它们。可能类似于
AbiWord-h
AbiWord/?
将提供选项列表

您是否尝试手动执行
AbiWord--to=html bpls.docx
?是的,但仅当文档文件与AbiWord.exe位于同一文件夹中时才有效。这不是一个答案:(奇怪,为什么它被接受。