For PHPWORDCOM component problems, we need to use php to operate the word. The system is not configured, and the configuration is as follows:
1. the php ext folder contains the php_com_dotnet.dll file;
2. com. allow_dcom = true and extension = php_com_dotnet.dll are added to php. ini.
3. the com in the management device is also enabled. However, when I enter such a test program:
$ Word = new COM ("word. application") or die ("Unable to instantiate Word ");
Echo "Loaded Word, version {$ word-> Version} \ n ";
?>
The following error occurs:
! ) Fatal error: Class 'com' not found in D: \ wamp \ www \ test \ word. php on line 3
Call Stack
# Time Memory Function Location
1 0.0000 141624 {main} () .. \ word. php: 0
I would like to ask why?
Reply to discussion (solution)
In another way, please refer to this blog for details! Well written! Http://blog.csdn.net/pqhdp/article/details/5626758