php calls COM components, php calls components
PHP opens COM components
1. First open the COM option in 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 extension= needs to be configured in PHP.ini php_com_dotnet.dll, not required if PHP VERSION<5.4.5. Otherwise, an error Fatal error: Class 'COM' not found may be reported.
The configuration method is: just add extension=php_com_dotnet.dll to the extension list
After the configuration is completed, you can test it. The statement is
$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 this machine.
openoffice is:
$obj = new COM("com.sun.star.ServiceManager")
or die("Unable to instanciate Word");
http://www.bkjia.com/PHPjc/1072322.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1072322.htmlTechArticlephp calls the COM component, php calls the component PHP. Turn on the COM component 1. First go to PHP.INI and open the COM option. com.allow_dcom = true 2. My environment here is PHP5.4.7. After PHP 5.4.5, the com/dotnet module...