PHP to turn on COM components
1. Open COM option first to php.ini, com.allow_dcom = True
2. my environment Here is PHP5.4.7,after PHP 5.4.5, the Com/dotnet module has become a separate extension, so you need to configure Extension=php_com_dotnet.dll in php.ini , if PHP version<5.4.5 is not required. Otherwise, it might be an error Fatal Error:class ' COM ' not found.
The configuration method is: Simply add extension=php_com_dotnet.dll in the extension list
After the configuration is complete, you can test the statement
$word = new COM ("Word.Application") or Die ("Unable to instanciate word");
Print "Loaded Word, Version {$word->version}\n";
The above statement must have Office installed on the computer to
The OpenOffice is:
$obj = new COM ("Com.sun.star.ServiceManager") or Die ("Unable to instanciate Word");
The above describes the PHP call COM components, including aspects of the content, I hope that the PHP tutorial interested in a friend helpful.