一.安装步骤:
1.建立FTP服务在本机上,端口为21,用户名和密码必须都是administrtor ;
2.把bbmftp.cab和bbmftp.js放到工程中;
3.在包含控件的页面加入代码:
<script type="text/javascript">
<!--系统级函数,无需变更-->
function fileupload(){
var files = document.getElementsByName("files");
if(files[0].value.length<1){
alert("温馨提醒:您还没有选择视频!");
return;
}else if (files[0].value.toLowerCase().indexOf(".avi") <= 0 &&files[0].value.toLowerCase().indexOf(".mov") <= 0) {
alert("温馨提醒:只能上传avi,mov格式文件!");
return;
}else if(files[0].value.toLowerCase().indexOf(" ") >= 0){
alert("温馨提醒:需要上传的附件地址存在空格,请把该文件直接复制到C盘根目录再进行上传,谢谢!");
return;
}
if(systembbmftpisstart==true){
alert("温馨提醒:当前正在上传附件,请稍后!");
return;
}
if(bbmftpcontrol==null){
bbmftpinit();
bbmftppageinit();
}
systembbmftpfilepatharrryinit();
setFilePath();
uploadstart();
}
<!--用户级函数,按需变更-->
function bbmftppageinit(){
setErrorDiv("errorinfo");
setFileInfoDiv("fileinfo");
setUploadInfoDiv("uploadinfo");
setBackfunction("backfunction()");
}
function setFilePath(){
var files = document.getElementsByName("files");
var tmp;
for ( var i = 0; i < files.length; i++) {
tmp = translation(files[i].value);
if(tmp==""||tmp.indexOf("/")<0){
continue;
}
uploadfilepathadd(tmp);
}
document.getElementById("uploadinfolegends").style.display='';
document.getElementById("s").disabled=true;
}
function backfunction(){
if(systembbmftpbackdataarray!=null&&systembbmftpbackdataarray.length>0){
var files = document.getElementsByName("files");
var filesftpname = document.getElementsByName("filesftpname");//
var contentTitle = document.getElementsByName("contentTitle");//
var filessize = document.getElementsByName("filessize");//文件大小
var filesduration = document.getElementsByName("filesduration");//播放时长
if(filesftpname.length!=files.length){
return;
}
var tmp,temp;
for(var i = 0 ; i <files.length ; i++){
temp = translation(files[i].value);
if(temp==""||temp.indexOf("/")<0){
continue;
}
for(x in systembbmftpbackdataarray){
if(systembbmftpbackdataarray[x].indexOf(temp+systembbmftpsplit)>=0){
var tmps = systembbmftpbackdataarray[x].split(systembbmftpsplit);
if(tmps.length!=4){
alert("温馨提醒:获取反馈信息有问题("+tmps.length+")!");
}else{
contentTitle[i].value = tmps[0];
filessize[i].value = tmps[1];
filesduration[i].value = tmps[2];
filesftpname[i].value = tmps[3];
}
break;
}
}
}
bbmftpupload.submit();
}else{
alert('温馨提醒:没有任何附件成功上传到FTP服务器!');
}
}
</script>
4.在body加入代码:
<body onload="bbmftpinit();bbmftppageinit();">
<form id="bbmftpupload" action="" method="post">
<table>
<tr align="left">
<td>选择附件:</td>
<td>
<input type="file" id="files" name="files" size="30" class="search_w5"/><font color="red">*</font>
<input type="hidden" id="filesftpname" name="filesftpname" value="">
<input type="hidden" id="contentTitle" name="contentTitle" value="">
<input type="hidden" id="filessize" name="filessize" value="">
<input type="hidden" id="filesduration" name="filesduration" value="">
</td>
</tr>
<tr>
<td colspan="2">
<input type="button" id="s" name="s" class="windowBtn" onClick="fileupload();" value="提交">
</td>
</tr>
</table>
</form>
<div id="uploadinfolegends" style="display: none">
<fieldset class="searchField">
<legend>
FTP进度信息:
</legend>
<div id="errorinfo"></div>
<div style="width:100%">
<div id="fileinfo"></div>
<div id="uploadinfo"></div>
</div>
</fieldset>
</div>
<object id="bbmftpcontrol" width="1" height="1" codeBase="bbmftp.cab#version=1,0,0,1" classid="CLSID:4167EA17-1DE2-425F-9714-0E60910D2FFB">
<PARAM NAME="_Version" VALUE="65536">
<PARAM NAME="_ExtentX" VALUE="2646">
<PARAM NAME="_ExtentY" VALUE="1323">
<PARAM NAME="_StockProps" VALUE="0">
</object>
</body>
5.这样就可以访问服务了
二.特别提醒:
1.该试用版本是对单个视频进行FTP上传的ActiveX控件,可以获取到视频的播放时长,如果您需要其他视频参数或者多文件上传,必须定制开发;
2.文件放到FTP后,文件名自动转为以时间戳为文件名;
3.由于获取播放时长的mediainfo 工具不允许上传路径有空格出现,所以系统必须限制上传地址无空格存在;
4.本控件目前支持AVI和MOV格式,其他视频均无经历复合测试;
5.本控件版权所有为成为坏人(QQ:614937815)所有,请需要商用的用户必须向版权所有者购买,否则一切后果由使用者自负;
6.需要调整IE安全中ACTIVE控件全部设置为启动。
三.其他说明
1.欢迎下载成为坏人系统软件之单点登录系统,下载地址为:
http://download.csdn.net/detail/becomebadman/2886008;
http://download.csdn.net/detail/becomebadman/2885936;
http://download.csdn.net/detail/becomebadman/2885977;
注意三部分缺一不可;
FTP上传ACTIVEX控件
5星 · 超过95%的资源 需积分: 10 98 浏览量
2011-10-24
23:19:20
上传
评论
收藏 1.48MB RAR 举报
becomebadman
- 粉丝: 0
- 资源: 30
最新资源
- 正点原子开拓者FPGA多人表决器代码项目
- EOP-Last5Years.txt
- windows 32位、64位系统常见缺少的库
- 毕业设计基于springboot+vue实现的求职招聘类型网站源码+数据库(高分项目).zip
- 535springboot + vue 体质测试数据分析及可视化设计.zip(可运行源码+数据库文件+文档)
- python毕业设计-基于Django+OpenCV的二维码生成与识别系统源码.zip
- 基于springboot+vue实现的求职招聘类型网站源代码+数据库(优质毕设项目).zip
- iOS APP提审checklist
- 第十四届中北大学ACM程序设计竞赛.zip
- UIGF_200852355_202404242026.json
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈