问题
I'm having an issue trying to get COM to work on my local iis server running php. This is related to an earlier post but now i am finding COM just simply does not load anything.
I've tried this...
new COM( 'ADODB.Connection' )
I've also tried this...
new COM("WScript.Shell")
both of these lines of code will not work. They do not throw errors, just simply die and do not execute any further in the code. I've tried catching an exception in a try-Catch but nothing gets returned. I'm guessing that there is something wrong with COM but have never used it before so I don't know where to look to fix it or enable it. Any help is appreciated. Thanks.
回答1:
From the installation page;
As of PHP 5.3.15 / 5.4.5, this extension requires php_com_dotnet.dll to be enabled inside of php.ini in order to use these functions. Previous versions of PHP enabled these extensions by default.
Since you're running 5.3.19, you'll need to enable it in php.ini using something like;
[COM_DOT_NET]
extension=php_com_dotnet.dll
来源:https://stackoverflow.com/questions/16132340/php-com-does-not-work-in-iis