How do I read Word, Excell, and PDF docs in PHP?

孤人 提交于 2019-12-24 02:54:07

问题


I need to be able to read the text of many different file types in PHP, including .doc, .docx, excel, and PDF files. I found a few methods online that require installing multiple packages but I was wondering if there was a better way to do this?


回答1:


No matter which way you swing it, there is no way to kill all these birds with one stone.

Word Thread:

Reading/Writing a MS Word file in PHP

Excel Thread:

Reading an Excel file in PHP

PDF Thread:

Read pdf files with php




回答2:


office 2007 is very easy, just need to unzip them and read the xml files, older versions of office and pdf will need extra packages.




回答3:


I don't think there is native support for reading documents with PHP. Installing these packages is the only choice. :-)



来源:https://stackoverflow.com/questions/5129018/how-do-i-read-word-excell-and-pdf-docs-in-php

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!