问题
What i should do to use ActiveX on php?
I have a few dll, that implements connection to db. But i don't know, how to use them on php. I understand, that i can't write smt like require('mylib.dll'), but what should i do?
So, the first question is: how to "include" dll in php code?
And the second is: How use ActiveX objects in code?
i'll expect smt like this:
$obj = new ActiveXObject("MyActiveX.MyConnection");
回答1:
I guess it is possible using the COM Functions.
I don't know if it works for your specific ActiveX-Controls since they have to implement IDispatch
otherwise the "dynamic" access to the methods won't work. And as far as I know you can't import a typelib in PHP.
来源:https://stackoverflow.com/questions/7316694/how-to-use-activex-in-php