在 php 中将 .doc 转换为 html

2021-12-31 00:00:00 ms-word php html

有没有人找到一个好的类或其他文件,可以将 .doc 文件转换为 html 或我可以阅读并转换为 html 的内容?

Has anyone found a good class, or other file that will convert a .doc file into html or something that I can read and turn into html?

我已经环顾了几个小时,但只找到了需要在服务器上使用 msword 才能转换文件的文件.我很确定这不是一个选项,但我实际上并没有与我的托管服务提供商讨论过这个问题.

I have been looking around for a couple hours now and have only found ones that require msword on the server in order to convert the file. I am pretty sure that is not an option but I have not actually talked to my hosting provider about it.

目标是让用户能够将文件上传到我的服务器,服务器处理转换,然后将其显示为 html,就像谷歌将其视为 html 功能一样.

The goal is for a user to be able to upload the file to my server and the server handle the conversion and then display it as html, much like googles view as html feature.

推荐答案

安装并使用abiword,像这样:

intall and use abiword, like this:

AbiWord --to=html archivo.doc

你可以从php调用这个命令.

you can call this command from php.

相关文章