PHP与COM组件
用VC6编了个Com,UnitConv.dll
注册成功了。
用php5调用:
<?php
$co=new COM("UnitConv.UnitConvert") or die("Loading COM failed!");
$ret= 1;
$ret = $co->Convert("m", "mm", $ret);
print($ret);
?>
结果出现:
Fatal error: Uncaught exception 'com_exception' with message 'Failed to create COM object `UnitConv.UnitConvert': No such interface supported ' in D:\htdocs\php.php:2 Stack trace: #0 D:\htdocs\php.php(2): com->com('UnitConv.UnitCo...') #1 {main} thrown in D:\htdocs\php.php on line 2
是不是根com类型有关? 要不要在php.ini该什么配置?