2014-08-28 13:34 2950 People read comments (0) favorite reports
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
These days to help friends solve a technical problem, under Linux, the Word document read the content, and then use regular matching, into SQL storage
After reviewing the foreign language information and Google, the steps are as follows:
#wget http://www.winfield.demon.nl/linux/antiword-0.37.tar.gz
#tar ZXVF antiword-0.37.tar.gz
#cd antiword-0.37
#make
#make Install
After the installation is complete, if you want to view it on the web, you need to use ROOT to perform make Global_install
[PHP]View PlainCopy
- <?php
- Header ("content-type:text/html; Charset=utf-8 ");
- $filename = ' Test.doc ';
- #$content = shell_exec (' Antiword '). $FILENAME);
- $content = shell_exec (' antiword-mutf-8 '. $FILENAME);
- echo ' <pre> ';
- Print_r ($content);
- echo ' </pre> ';
PHP reads Word documents in Linux