Home  >  Article  >  Backend Development  >  Analysis of the method of reading word documents with PHP

Analysis of the method of reading word documents with PHP

藏色散人
藏色散人forward
2019-11-09 14:00:045518browse

1. First open the COM of php.ini

1.Set the php extension directory

Analysis of the method of reading word documents with PHP

2.Add dll configuration

Analysis of the method of reading word documents with PHP

3. Restart apache to make the php.ini configuration take effect

Analysis of the method of reading word documents with PHP

2. After opening it, you can Try the following operations

● Create an index pointing to the new COM component

● Display the version number of Word currently being used

● Turn its visibility Set to 0 (false), if you want it to be opened at the front end, use 1 (true)

● Open a document

● Read the document content

● Output Document content

● Close the word connection

● Clear the object

The specific code is as follows:

Analysis of the method of reading word documents with PHP

##The effect is as follows:

Analysis of the method of reading word documents with PHP

Recommended: "

PHP Tutorial"

The above is the detailed content of Analysis of the method of reading word documents with PHP. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:segmentfault.com. If there is any infringement, please contact admin@php.cn delete