我正在尝试在我的PHP代码中加载一个Activex,我知道这可以用PHP中的COM函数完成,所以我尝试访问我的方法如下:
<?PHP
$active = new COM("sswATL.crypto");
//------------------------
$pass = "pincode";
$ret = $active->init( $pass , $retVal);
if($retVal == 0){
print "Login successfully";
}
elseif($retVal == 4){
print "Token is not present";
}
else
{
$errMsg = "Login failed : ";
print $errMsg;
}
?>
但是我收到了这个错误:
Fatal error: Uncaught exception 'com_exception'
with message '<b>Source:</b> Unknown<br/><b>Description:</b> Unknown'
in C:\my\php\file\path.php
Stack trace:
#0 C:\my\php\file\path.php: com->init('pincode', NULL)
#1 {main}
thrown in C:\my\php\file\path.php on line 7
init方法声明为:
int init(string s,int &num);
任何想法?