如何在PHP中使用ActiveX? [英] how to use ActiveX in PHP?

查看:89
本文介绍了如何在PHP中使用ActiveX?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

php 上使用 ActiveX 应该怎么做?

我有一些dll,可以实现与数据库的连接。但是我不知道如何在php上使用它们。
我知道,我不能像require('mylib.dll')一样写smt,但是我应该怎么办?

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?

所以,第一个问题是:
如何在php代码中包含 dll?

So, the first question is: how to "include" dll in php code?

第二个是:
如何在代码中使用ActiveX对象?

And the second is: How use ActiveX objects in code?

我希望像这样:

$obj = new ActiveXObject("MyActiveX.MyConnection");


推荐答案

我想可以使用 COM函数

I不知道它是否适用于您的特定ActiveX控件,因为它们必须实现 IDispatch ,否则对这些方法的动态访问将不起作用。据我所知,您无法在PHP中导入typelib。

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.

这篇关于如何在PHP中使用ActiveX?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆