Home  >  Article  >  Backend Development  >  php calls COM components, php calls components_PHP tutorial

php calls COM components, php calls components_PHP tutorial

WBOY
WBOYOriginal
2016-07-12 09:04:411166browse

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");

www.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...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn