activex组件未从apachexampp加载


activex component not loading from apache xampp

我正在开发一个使用指纹识别的web应用程序。我在windows上使用XAMPP,使用SECUGEN指纹设备和他们提供的API。他们给出了一个示例html文件,其中他们使用activex组件从浏览器访问指纹设备。当我尝试通过D:'files'sample.html访问时,它运行得很好。我得到一个提示,"当前页面需要一个activex组件,当我说‘是’时,它就可以使用了。"

但是,问题从这里开始。我将该文件(sample.html)移到了XAMPP服务器的htdocs中,并试图通过http://localhost/app/sample.html访问它,我想activex组件没有加载。

这是代码:

<!DOCTYPE Html>
<html>
<head>
<title>ActiveX Example 1.1 of SecuGen FDx Pro SDK </title>
<script type="text/javascript">
<!--
var aaa = 0;
function fnOpenDevice()
{
    for ( i=0; i<3; i++)
    {
        document.frmmain.objFP[i].DeviceID = document.frmmain.inc.value;
        document.frmmain.objFP[i].CodeName = document.frmmain.dev.value;
        document.frmmain.objFP[i].MinutiaeMode = document.frmmain.templateFormat.value;
    }
    // template format of objVerify should be the same to those of objFP[]
    objVerify.MinutiaeMode = document.frmmain.templateFormat.value;
    return;
}
function fnCapture(idx)
{
    document.frmmain.objFP[idx].Capture();
    var result = document.frmmain.objFP[idx].ErrorCode;
    if (result == 0)
    {   
        //var strimg1 = objFP.ImageTextData;
        var strmin = document.frmmain.objFP[idx].MinTextData;
        document.frmmain.min[idx].value = strmin;
    }
    else
        alert('failed - ' + result);
    return;
}
function fnRegister()
{
    var strmin1 = document.frmmain.min[0].value;
    var strmin2 = document.frmmain.min[1].value;
    if ( objVerify.RegisterForText(strmin1, strmin2) && objVerify.ErrorCode == 0 )
        alert('success- registered');
    else
        alert('failed - ' + objVerify.ErrorCode);
    return;
}
function fnVerifyEx()
{   
    var strmin1 = document.frmmain.min[0].value;
    var strmin2 = document.frmmain.min[1].value;
    var strmin3 = document.frmmain.min[2].value;
    if ( objVerify.VerifyExForText(strmin1, strmin2, strmin3) && objVerify.ErrorCode == 0)
        alert('Success - matched');
    else
        alert('Failed - ' + objVerify.ErrorCode);
    return;
}
function fnVerify()
{   
    var strmin1 = document.frmmain.min[0].value;
    var strmin2 = document.frmmain.min[2].value;
    if ( objVerify.VerifyForText(strmin1, strmin2) && objVerify.ErrorCode == 0 )
        alert('Success - matched');
    else
        alert('Failed - ' + objVerify.ErrorCode);
    return;
}
function fnSetimage()
{
    document.frmmain.objFP.ImageTextData = document.frmmain.img1.value;
    return;
}
// -->
</script>
</head>
<body>
<h4><b>ActiveX Example 1.1 of SecuGen FDx Pro SDK</b></h4>
<p></p>
<OBJECT id="objVerify" style="LEFT: 0px; TOP: 0px" height=0 width=0 
    classid="CLSID:8D613732-7D38-4664-A8B7-A24049B96117" 
    name=objVerify VIEWASTEXT>
</OBJECT>
<form name=frmmain>
Device Type :
<select name="dev">
<option value="0">FDP02
<option value="1">FDU02
<option value="2">FDU03
<option selected value="3">FDU04
<option value="4">FDU05
</select>
Instance No. :
<select name="inc">
<option value="-1">-1   
<option value="0" selected>0
<option value="1">1
<option value="2">2
<option value="3">3
<option value="4">4
<option value="5">5
<option value="6">6
<option value="7">7
<option value="8">8
<option value="9">9
</select>
<p>
Template Format:
<select name="templateFormat">
<option value="256">ANSI 378
<option value="512">SG 400
<option value="768">ISO 19794-2
</select>
<input type="button" name="open" value='Open Device' OnClick='fnOpenDevice();'>
<p>
<table border="1" cellspacing="0" cellpadding="0">
<caption> Fingerprint Images </caption>
<tr>
<td>
    <OBJECT id="objFP" style="LEFT: 0px; WIDTH: 149px; TOP: 0px; HEIGHT: 182px" height="182" 
        width="149" classid="CLSID:D547FDD7-82F6-44e8-AFBA-7553ADCEE7C8" name="objFP" VIEWASTEXT>
    <PARAM NAME="CodeName" VALUE="1">
    </OBJECT>
</td>
<td>
    <OBJECT id="objFP" style="LEFT: 0px; WIDTH: 149px; TOP: 0px; HEIGHT: 182px" height="182" 
        width="149" classid="CLSID:D547FDD7-82F6-44e8-AFBA-7553ADCEE7C8" name="objFP" VIEWASTEXT>
    <PARAM NAME="CodeName" VALUE="1">
    </OBJECT>
</td>
<td>
    <OBJECT id="objFP" style="LEFT: 0px; WIDTH: 149px; TOP: 0px; HEIGHT: 182px" height="182" 
        width="149" classid="CLSID:D547FDD7-82F6-44e8-AFBA-7553ADCEE7C8" name="objFP" VIEWASTEXT>
    <PARAM NAME="CodeName" VALUE="1">
    </OBJECT>
</td>
</tr>
<tr>
<td align="center"><input type="button" name="btnCapture1" value='Capture' OnClick='fnCapture(0);'></td>
<td align="center"><input type="button" name="btnCapture2" value='Capture' OnClick='fnCapture(1);'></td>
<td align="center"><input type="button" name="btnCapture3" value='Capture' OnClick='fnCapture(2);'></td>
</tr>
</table>
<p>
min1 : <input type="text" name="min"><br>
min2 : <input type="text" name="min"><br>
min3 : <input type="text" name="min">
<p>
<input type="button" name="btnRegister" value='Register' OnClick='fnRegister();' style='width:200px'>
<br>
<input type="button" name="btnVerify" value='VerifyEx' OnClick='fnVerifyEx();' style='width:200px'>
<br>
<input type="button" name="btnVerify" value='Verify' OnClick='fnVerify();' style='width:200px'>
</form>
</body>
</html>

可能是什么问题?如果需要其他信息,请告诉我。

您必须添加http://localhost允许在例如中使用activex控件的站点列表

以下是在ie 中启用activex控制的步骤

启动Internet Explorer,单击"工具"->"Internet选项"。

  1. 单击"安全"选项卡,并将"中"设置为Internet和本地intranet区域的"安全级别"。

  2. 单击Custom Level(自定义级别)按钮,并确保以下设置为Enabled(启用):

运行ActiveX控件和插件

编写标记为可安全编写脚本的ActiveX控件

  1. 启用这些设置后,单击"确定"。

  2. 单击受信任的站点图标,然后单击站点按钮。

  3. 清除此区域中所有站点需要服务器验证(https:)选项之前的复选框。

  4. 填写您的本地页面(例如,http://localhost)在"将此网站添加到区域"字段中,然后单击"添加"。

  5. 单击"关闭"。

  6. 再次单击"确定"保存更改。

  7. 重新启动Internet Explorer并测试问题。

您必须添加https://localhost允许在您的网站上使用IE 9或更高版本中的活动ActiveX控件。

您必须添加http://localhost以允许在例如中使用activex控件的站点列表