我需要一種相當可靠的方式將一個word文檔轉換爲PHP中的字符串。在PHP中讀取word文檔
我剛剛安裝了Antiword。它適用於許多文件,包括doc和docx,但它對某些文件有問題,並給出錯誤:「[文件名]不是Word文檔」,即使它們是。
我關於閱讀到這個問題:
This is the new-style XML-in-a-zip-container format, which is completely different to the binary Microsoft Word formats which antiword handles most of.
There's no realistic likelihood of antiword supporting this - the last antiword upstream release was 2005-10-21 (which predates this XML format).
是否有閱讀在PHP這些新格式的Word文檔某種方式?
也許https://github.com/PHPOffice/PHPWord? – chris85
我確實認爲,但我很懷疑它的功能後閱讀:http://stackoverflow.com/questions/20555057/how-to-read-doc-file-via-phpword – dlofrodloh