upload.html
 <!DOCTYPE html>
<html lang="en">
<head>
<script type='text/javascript' src='swfupload.js'></script>
<link href="default.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/fileprogress.js"></script>
<script type="text/javascript" src="js/handlers.js"></script>
</head>
<body>
<div id="divSWFUploadUI" style="margin-top: 20px;">
<div class="fieldset flash" id="fsUploadProgress">
<span class="legend">Upload Queue</span>
</div>
<div id="SWFUploads">
<p>
<span id="SWFUpload"></span>
<input id="btnCancel" type="button" value="Cancel All Uploads" disabled="disabled" style="margin-left: 2px; height: 22px; font-size: 8pt;" />
<br />
</p>
</div>
<div>
<div id="divLoadingContent" class="content" style="background-color: #FFFF66; border-top: solid 4px #FF9966; border-bottom: solid 4px #FF9966; margin: 10px 25px; padding: 10px 15px; display: none;">
SWFUpload is loading. Please wait a moment...
</div>
<div id="divLongLoading" class="content" style="background-color: #FFFF66; border-top: solid 4px #FF9966; border-bottom: solid 4px #FF9966; margin: 10px 25px; padding: 10px 15px; display: none;">
SWFUpload is taking a long time to load or the load has failed. Please make sure that the Flash Plugin is enabled and that a working version of the Adobe Flash Player is installed.
</div>
<div id="divAlternateContent" class="content" style="background-color: #FFFF66; border-top: solid 4px #FF9966; border-bottom: solid 4px #FF9966; margin: 10px 25px; padding: 10px 15px; display: none;">
We're sorry. SWFUpload could not load. You may need to install or upgrade Flash Player.
Visit the <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">Adobe website</a> to get the Flash Player.
</div> <script type='text/javascript'>
var swf;
var settings={
upload_url:'upload.php',
flash_url : "swfupload.swf",
post_params: {
"PHPSESSID" : "NONE",
"HELLO-WORLD" : "Here I Am",
".what" : "OKAY"
},
file_size_limit : "1000 MB",
file_types : "*.mp4",
file_upload_limit : ,
file_queue_limit : ,
custom_settings : {
progressTarget : "fsUploadProgress",
cancelButtonId : "btnCancel"
},
debug: false, // Button Settings
button_image_url : "XPButtonUploadText_61x22.png",
button_placeholder_id : "SWFUpload",
button_width: ,
button_height: , // The event handler functions are defined in handlers.js
swfupload_preload_handler : swfUploadPreLoad,
swfupload_load_failed_handler : swfUploadLoadFailed,
swfupload_loaded_handler : swfUploadLoaded,
file_queued_handler : fileQueued,
file_queue_error_handler : fileQueueError,
file_dialog_complete_handler : fileDialogComplete,
upload_start_handler : uploadStart,
upload_progress_handler : uploadProgress,
upload_error_handler : uploadError,
upload_success_handler : uploadSuccess,
upload_complete_handler : uploadComplete,
queue_complete_handler : queueComplete // Queue plugin event }; swf= new SWFUpload (settings);
</script>
</body>
</html>

upload.html



upload.php
 <?php
if(!is_dir("./files")) mkdir("./files", );
move_uploaded_file($_FILES['Filedata']['tmp_name'], "./files/".$_FILES['Filedata']['name']);
handler.js
 /* Demo Note:  This demo uses a FileProgress class that handles the UI for displaying the file name and percent complete.
The FileProgress class is not part of SWFUpload.
*/ /* **********************
Event Handlers
These are my custom event handlers to make my
web application behave the way I went when SWFUpload
completes different tasks. These aren't part of the SWFUpload
package. They are part of my application. Without these none
of the actions SWFUpload makes will show up in my application.
********************** */ function swfUploadPreLoad() {
var self = this;
var loading = function () {
//document.getElementById("divSWFUploadUI").style.display = "none";
document.getElementById("divLoadingContent").style.display = ""; var longLoad = function () {
document.getElementById("divLoadingContent").style.display = "none";
document.getElementById("divLongLoading").style.display = "";
};
this.customSettings.loadingTimeout = setTimeout(function () {
longLoad.call(self)
},
*
);
}; this.customSettings.loadingTimeout = setTimeout(function () {
loading.call(self);
},
*
);
}
function swfUploadLoaded() {
var self = this;
clearTimeout(this.customSettings.loadingTimeout);
//document.getElementById("divSWFUploadUI").style.visibility = "visible";
//document.getElementById("divSWFUploadUI").style.display = "block";
document.getElementById("divLoadingContent").style.display = "none";
document.getElementById("divLongLoading").style.display = "none";
document.getElementById("divAlternateContent").style.display = "none"; //document.getElementById("btnBrowse").onclick = function () { self.selectFiles(); };
document.getElementById("btnCancel").onclick = function () { self.cancelQueue(); };
} function swfUploadLoadFailed() {
clearTimeout(this.customSettings.loadingTimeout);
//document.getElementById("divSWFUploadUI").style.display = "none";
document.getElementById("divLoadingContent").style.display = "none";
document.getElementById("divLongLoading").style.display = "none";
document.getElementById("divAlternateContent").style.display = "";
} function fileQueued(file) {
try {
var progress = new FileProgress(file, this.customSettings.progressTarget);
progress.setStatus("Pending...");
progress.toggleCancel(true, this); } catch (ex) {
this.debug(ex);
} } function fileQueueError(file, errorCode, message) {
try {
if (errorCode === SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED) {
alert("You have attempted to queue too many files.\n" + (message === ? "You have reached the upload limit." : "You may select " + (message > ? "up to " + message + " files." : "one file.")));
return;
} var progress = new FileProgress(file, this.customSettings.progressTarget);
progress.setError();
progress.toggleCancel(false); switch (errorCode) {
case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:
progress.setStatus("File is too big.");
this.debug("Error Code: File too big, File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
break;
case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE:
progress.setStatus("Cannot upload Zero Byte files.");
this.debug("Error Code: Zero byte file, File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
break;
case SWFUpload.QUEUE_ERROR.INVALID_FILETYPE:
progress.setStatus("Invalid File Type.");
this.debug("Error Code: Invalid File Type, File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
break;
default:
if (file !== null) {
progress.setStatus("Unhandled Error");
}
this.debug("Error Code: " + errorCode + ", File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
break;
}
} catch (ex) {
this.debug(ex);
}
} function fileDialogComplete(numFilesSelected, numFilesQueued) {
try {
if (numFilesSelected > ) {
document.getElementById(this.customSettings.cancelButtonId).disabled = false;
} /* I want auto start the upload and I can do that here */
this.startUpload();
} catch (ex) {
this.debug(ex);
}
} function uploadStart(file) {
try {
/* I don't want to do any file validation or anything, I'll just update the UI and
return true to indicate that the upload should start.
It's important to update the UI here because in Linux no uploadProgress events are called. The best
we can do is say we are uploading.
*/
var progress = new FileProgress(file, this.customSettings.progressTarget);
progress.setStatus("Uploading...");
progress.toggleCancel(true, this);
}
catch (ex) {} return true;
} function uploadProgress(file, bytesLoaded, bytesTotal) {
try {
var percent = Math.ceil((bytesLoaded / bytesTotal) * ); var progress = new FileProgress(file, this.customSettings.progressTarget);
progress.setProgress(percent);
progress.setStatus("Uploading...");
} catch (ex) {
this.debug(ex);
}
} function uploadSuccess(file, serverData) {
try {
var progress = new FileProgress(file, this.customSettings.progressTarget);
progress.setComplete();
progress.setStatus("Complete.");
progress.toggleCancel(false); } catch (ex) {
this.debug(ex);
}
} function uploadError(file, errorCode, message) {
try {
var progress = new FileProgress(file, this.customSettings.progressTarget);
progress.setError();
progress.toggleCancel(false); switch (errorCode) {
case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:
progress.setStatus("Upload Error: " + message);
this.debug("Error Code: HTTP Error, File name: " + file.name + ", Message: " + message);
break;
case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED:
progress.setStatus("Upload Failed.");
this.debug("Error Code: Upload Failed, File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
break;
case SWFUpload.UPLOAD_ERROR.IO_ERROR:
progress.setStatus("Server (IO) Error");
this.debug("Error Code: IO Error, File name: " + file.name + ", Message: " + message);
break;
case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR:
progress.setStatus("Security Error");
this.debug("Error Code: Security Error, File name: " + file.name + ", Message: " + message);
break;
case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:
progress.setStatus("Upload limit exceeded.");
this.debug("Error Code: Upload Limit Exceeded, File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
break;
case SWFUpload.UPLOAD_ERROR.FILE_VALIDATION_FAILED:
progress.setStatus("Failed Validation. Upload skipped.");
this.debug("Error Code: File Validation Failed, File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
break;
case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:
// If there aren't any files left (they were all cancelled) disable the cancel button
if (this.getStats().files_queued === ) {
document.getElementById(this.customSettings.cancelButtonId).disabled = true;
}
progress.setStatus("Cancelled");
progress.setCancelled();
break;
case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:
progress.setStatus("Stopped");
break;
default:
progress.setStatus("Unhandled Error: " + errorCode);
this.debug("Error Code: " + errorCode + ", File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
break;
}
} catch (ex) {
this.debug(ex);
}
} function uploadComplete(file) {
if (this.getStats().files_queued === ) {
document.getElementById(this.customSettings.cancelButtonId).disabled = true;
}
} // This event comes from the Queue Plugin
function queueComplete(numFilesUploaded) {
var status = document.getElementById("divStatus");
status.innerHTML = numFilesUploaded + " file" + (numFilesUploaded === ? "" : "s") + " uploaded.";
}

handler.js


jsProgress.js
 /*
A simple class for displaying file information and progress
Note: This is a demonstration only and not part of SWFUpload.
Note: Some have had problems adapting this class in IE7. It may not be suitable for your application.
*/ // Constructor
// file is a SWFUpload file object
// targetID is the HTML element id attribute that the FileProgress HTML structure will be added to.
// Instantiating a new FileProgress object with an existing file will reuse/update the existing DOM elements
function FileProgress(file, targetID) {
this.fileProgressID = file.id; this.opacity = ;
this.height = ; this.fileProgressWrapper = document.getElementById(this.fileProgressID);
if (!this.fileProgressWrapper) {
this.fileProgressWrapper = document.createElement("div");
this.fileProgressWrapper.className = "progressWrapper";
this.fileProgressWrapper.id = this.fileProgressID; this.fileProgressElement = document.createElement("div");
this.fileProgressElement.className = "progressContainer"; var progressCancel = document.createElement("a");
progressCancel.className = "progressCancel";
progressCancel.href = "#";
progressCancel.style.visibility = "hidden";
progressCancel.appendChild(document.createTextNode(" ")); var progressText = document.createElement("div");
progressText.className = "progressName";
progressText.appendChild(document.createTextNode(file.name)); var progressBar = document.createElement("div");
progressBar.className = "progressBarInProgress"; var progressStatus = document.createElement("div");
progressStatus.className = "progressBarStatus";
progressStatus.innerHTML = "&nbsp;"; this.fileProgressElement.appendChild(progressCancel);
this.fileProgressElement.appendChild(progressText);
this.fileProgressElement.appendChild(progressStatus);
this.fileProgressElement.appendChild(progressBar); this.fileProgressWrapper.appendChild(this.fileProgressElement); document.getElementById(targetID).appendChild(this.fileProgressWrapper);
} else {
this.fileProgressElement = this.fileProgressWrapper.firstChild;
this.reset();
} this.height = this.fileProgressWrapper.offsetHeight;
this.setTimer(null); } FileProgress.prototype.setTimer = function (timer) {
this.fileProgressElement["FP_TIMER"] = timer;
};
FileProgress.prototype.getTimer = function (timer) {
return this.fileProgressElement["FP_TIMER"] || null;
}; FileProgress.prototype.reset = function () {
this.fileProgressElement.className = "progressContainer"; this.fileProgressElement.childNodes[].innerHTML = "&nbsp;";
this.fileProgressElement.childNodes[].className = "progressBarStatus"; this.fileProgressElement.childNodes[].className = "progressBarInProgress";
this.fileProgressElement.childNodes[].style.width = "0%"; this.appear();
}; FileProgress.prototype.setProgress = function (percentage) {
this.fileProgressElement.className = "progressContainer green";
this.fileProgressElement.childNodes[].className = "progressBarInProgress";
this.fileProgressElement.childNodes[].style.width = percentage + "%"; this.appear();
};
FileProgress.prototype.setComplete = function () {
this.fileProgressElement.className = "progressContainer blue";
this.fileProgressElement.childNodes[].className = "progressBarComplete";
this.fileProgressElement.childNodes[].style.width = ""; var oSelf = this;
this.setTimer(setTimeout(function () {
oSelf.disappear();
}, ));
};
FileProgress.prototype.setError = function () {
this.fileProgressElement.className = "progressContainer red";
this.fileProgressElement.childNodes[].className = "progressBarError";
this.fileProgressElement.childNodes[].style.width = ""; var oSelf = this;
this.setTimer(setTimeout(function () {
oSelf.disappear();
}, ));
};
FileProgress.prototype.setCancelled = function () {
this.fileProgressElement.className = "progressContainer";
this.fileProgressElement.childNodes[].className = "progressBarError";
this.fileProgressElement.childNodes[].style.width = ""; var oSelf = this;
this.setTimer(setTimeout(function () {
oSelf.disappear();
}, ));
};
FileProgress.prototype.setStatus = function (status) {
this.fileProgressElement.childNodes[].innerHTML = status;
}; // Show/Hide the cancel button
FileProgress.prototype.toggleCancel = function (show, swfUploadInstance) {
this.fileProgressElement.childNodes[].style.visibility = show ? "visible" : "hidden";
if (swfUploadInstance) {
var fileID = this.fileProgressID;
this.fileProgressElement.childNodes[].onclick = function () {
swfUploadInstance.cancelUpload(fileID);
return false;
};
}
}; FileProgress.prototype.appear = function () {
if (this.getTimer() !== null) {
clearTimeout(this.getTimer());
this.setTimer(null);
} if (this.fileProgressWrapper.filters) {
try {
this.fileProgressWrapper.filters.item("DXImageTransform.Microsoft.Alpha").opacity = ;
} catch (e) {
// If it is not set initially, the browser will throw an error. This will set it if it is not set yet.
this.fileProgressWrapper.style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity=100)";
}
} else {
this.fileProgressWrapper.style.opacity = ;
} this.fileProgressWrapper.style.height = ""; this.height = this.fileProgressWrapper.offsetHeight;
this.opacity = ;
this.fileProgressWrapper.style.display = ""; }; // Fades out and clips away the FileProgress box.
FileProgress.prototype.disappear = function () { var reduceOpacityBy = ;
var reduceHeightBy = ;
var rate = ; // 15 fps if (this.opacity > ) {
this.opacity -= reduceOpacityBy;
if (this.opacity < ) {
this.opacity = ;
} if (this.fileProgressWrapper.filters) {
try {
this.fileProgressWrapper.filters.item("DXImageTransform.Microsoft.Alpha").opacity = this.opacity;
} catch (e) {
// If it is not set initially, the browser will throw an error. This will set it if it is not set yet.
this.fileProgressWrapper.style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity=" + this.opacity + ")";
}
} else {
this.fileProgressWrapper.style.opacity = this.opacity / ;
}
} if (this.height > ) {
this.height -= reduceHeightBy;
if (this.height < ) {
this.height = ;
} this.fileProgressWrapper.style.height = this.height + "px";
} if (this.height > || this.opacity > ) {
var oSelf = this;
this.setTimer(setTimeout(function () {
oSelf.disappear();
}, rate));
} else {
this.fileProgressWrapper.style.display = "none";
this.setTimer(null);
}
};

jsProgress.js



defalut.css
 /* -----------------------------------------------
www.swfupload.org
Description: Common Screen Stylesheet for SWFUpload Demos
Updated on: May 1, 2008
----------------------------------------------- */ /* -----------------------------------------------
GLOBAL RESET
----------------------------------------------- */ html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: ;
padding: ;
border: ;
outline: ;
font-weight: inherit;
font-style: inherit;
font-size: %;
font-family: inherit;
vertical-align: baseline;
} /* remember to define focus styles! */
:focus { outline: ; }
body {
line-height: ;
color: black;
background: white;
}
ol, ul {
list-style: none;
}
/* tables still need 'cellspacing="0"' in the markup */
table {
border-collapse: separate;
border-spacing: ;
}
caption, th, td {
text-align: left;
font-weight: normal;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: "";
}
blockquote, q {
quotes: "" "";
} /* -----------------------------------------------
BASIC ELEMENTS
----------------------------------------------- */ /* -- Text Styles ------------------------------- */
html,
body {
margin: ;
padding: ;
width: %;
font: 12px/.4em Helvetica, Arial, sans-serif;
} a {
color: #385ea2;
text-decoration: none;
}
a:hover { text-decoration: underline; } strong { font-weight: ; } h1 {
font: 28px/1em Arial, Helvetica, sans-serif;
padding: 60px 20px 20px;
margin-bottom: 15px;
color: #;
text-decoration: none;
} h1 a{
color: #fff;
text-decoration: none;
} h2 {
font-size: 22px;
font-weight: ;
padding-top: 1em;
padding-bottom: .25em;
} p {
margin-top: .25em;
margin-bottom: .5em;
} ul { padding: 4px 5px; }
ul li {
padding: 4px 5px;
margin: 20px;
list-style:square;
} code {
display: block;
background:#edffb8 none repeat scroll %;
border-color:#b2da3a;
border-style:solid;
border-width:1px ;
font-size: 1em;
margin: 1em 0pt;
overflow:auto;
padding: .3em .4em;
white-space:pre;
} /* -- Layout ------------------------------- */ #header {
background: # url(../images/header-bg.jpg) repeat-x top left;
height: 125px;
position: relative;
}
#logo {
padding: ;
margin: ;
background: url(../images/logo.gif) no-repeat 20px 20px;
height: 106px;
width: 272px;
text-indent: -5000px;
overflow: hidden;
}
/* hide link text */
#logo a {
display: block;
color: #fff;
text-indent: -5000px;
overflow: hidden;
height: 106px;
width: 272px;
} #version {
color: #fff;
position: absolute;
right: 20px;
top: 85px;
} #content { width: 680px;}
#content { margin: 20px 90px; } /* -- Form Styles ------------------------------- */
form {
margin: ;
padding: ;
} div.fieldset {
border: 1px solid #afe14c;
margin: 10px ;
padding: 20px 10px;
}
div.fieldset span.legend {
position: relative;
background-color: #FFF;
padding: 3px;
top: -30px;
font: 14px Arial, Helvetica, sans-serif;
color: #73b304;
} div.flash {
width: 375px;
margin: 10px 5px;
border-color: #D9E4FF; -moz-border-radius-topleft : 5px;
-webkit-border-top-left-radius : 5px;
-moz-border-radius-topright : 5px;
-webkit-border-top-right-radius : 5px;
-moz-border-radius-bottomleft : 5px;
-webkit-border-bottom-left-radius : 5px;
-moz-border-radius-bottomright : 5px;
-webkit-border-bottom-right-radius : 5px; } button,
input,
select,
textarea {
border-width: 1px;
margin-bottom: 10px;
padding: 2px 3px;
} input[disabled]{ border: 1px solid #ccc } /* FF 2 Fix */ label {
width: 150px;
text-align: right;
display:block;
margin-right: 5px;
} #btnSubmit { margin: 155px ; } /* -- Table Styles ------------------------------- */
td {
font: 10pt Helvetica, Arial, sans-serif;
vertical-align: top;
} .progressWrapper {
width: 357px;
overflow: hidden;
} .progressContainer {
margin: 5px;
padding: 4px;
border: solid 1px #E8E8E8;
background-color: #F7F7F7;
overflow: hidden;
}
/* Message */
.message {
margin: 1em ;
padding: 10px 20px;
border: solid 1px #FFDD99;
background-color: #FFFFCC;
overflow: hidden;
}
/* Error */
.red {
border: solid 1px #B50000;
background-color: #FFEBEB;
} /* Current */
.green {
border: solid 1px #DDF0DD;
background-color: #EBFFEB;
} /* Complete */
.blue {
border: solid 1px #CEE2F2;
background-color: #F0F5FF;
} .progressName {
font-size: 8pt;
font-weight: ;
color: #;
width: 323px;
height: 14px;
text-align: left;
white-space: nowrap;
overflow: hidden;
} .progressBarInProgress,
.progressBarComplete,
.progressBarError {
font-size: ;
width: %;
height: 2px;
background-color: blue;
margin-top: 2px;
} .progressBarComplete {
width: %;
background-color: green;
visibility: hidden;
} .progressBarError {
width: %;
background-color: red;
visibility: hidden;
} .progressBarStatus {
margin-top: 2px;
width: 337px;
font-size: 7pt;
font-family: Arial;
text-align: left;
white-space: nowrap;
} a.progressCancel {
font-size: ;
display: block;
height: 14px;
width: 14px;
background-image: url(../images/cancelbutton.gif);
background-repeat: no-repeat;
background-position: -14px 0px;
float: right;
} a.progressCancel:hover {
background-position: 0px 0px;
} /* -- SWFUpload Object Styles ------------------------------- */
.swfupload {
vertical-align: top;
}

default.css



swfupload 例子的更多相关文章

  1. 用SWFUpload上传图片小例子

    在开发项目中,经常会用到上传图片,接下来我就用一种简单的方式给大家分享一下使用SWFUpload的方式上传图片. 1.在网站根目录下新建一个SWFUpload文件夹,把下载的组建放在SWFUpload ...

  2. SWFUpload简介及中文参考手册(share)

    SWFUpload SWFUpload 版本 2 概览 (Overview) 入门( Getting Started) js对象 (SWFUpload JavaScript Object) 构造器(C ...

  3. swfupload提示“错误302”的解决方法

    1.关于图片上传控件,flash控件的显示效果要好一些,本人使用swfupload 2.swfupload上传控件使用方式详见文档 http://www.leeon.me/upload/other/s ...

  4. SWFUpload 2.5.0版 官方说明文档 中文翻译版

    原文地址:http://www.cnblogs.com/youring2/archive/2012/07/13/2590010.html#setFileUploadLimit SWFUpload v2 ...

  5. 文件上传利器SWFUpload入门简易教程

    凡做过网站开发的都应该知道表单file的确鸡肋. Ajax解决了不刷新页面提交表单,但是却没有解决文件上传不刷新页面,当然也有其它技术让不刷新页面而提交文件,该技术主要是利用隐藏的iFrame, 较A ...

  6. swfupload使用说明

    网上的例子介绍的文档真的很多.下面简单介绍一下 SWFUpload的文件上传流程是这样的: 1.引入相应的js文件 2.实例化SWFUpload对象,传入一个配置参数对象进行各方面的配置. 3.点击S ...

  7. swfupload操作手册

    SWFUpload SWFUpload 最初是Vinterwebb.se 开发的客户端文件上传工具.它联合javascript和flash,在浏览器中提供一个优于传统上传标签 <input ty ...

  8. 文件上传工具swfupload[转]

    转至:http://zhangqgc.iteye.com/blog/906419 文件上传工具swfupload 示例: 1.JavaScript设置SWFUpload部分(与官方例子类似): var ...

  9. SWFUpload(转载)

    网上的例子介绍的文档真的很多.下面简单介绍一下 SWFUpload的文件上传流程是这样的: 1.引入相应的js文件 2.实例化SWFUpload对象,传入一个配置参数对象进行各方面的配置. 3.点击S ...

随机推荐

  1. HTML5 CSS3学习

    HTML5 CSS3学习 :http://www.1000zhu.com/course/css3/ HTML5 相关书籍:   http://www.html5cn.com.cn/news/gdt/2 ...

  2. IE6的连接数限制问题

    今天解决了一个bug.看似是UI的bug,最后发现IE的设置问题(严格来说,IE6这么做没有问题,因为HTTP协议的规范如此). 先描述一下问题: 有一个页面管理Job,选中一些Job可以Run,每次 ...

  3. oracle 存储过程 包 【转】

    一.为什么要用存储过程? 如果在应用程序中经常需要执行特定的操作,可以基于这些操作简历一个特定的过程.通过使用过程可以简化客户端程序的开发和维护,而且还能提高客户端程序的运行性能. 二.过程的优点? ...

  4. C# 模拟上传图片

    上传图片的格式一定要按规定的写,不然没办法正确上传的. 我在上传的时候就是值前面没有空一行,导致上传不成功,很纠结的错误. 我要模拟的是一个FLASH的上传控件,我开始用HttpAnalyze抓包是抓 ...

  5. the fifth class

      1.实际比背景长,怎么做到的? 2个父级一个做头背景一个做尾背景 2.2层,每次自带背景上下是覆盖关系,如何做到 2层?,子浮动 3.标签 4.border可覆盖:margin-bottom 为负 ...

  6. python ImportError: DLL load failed: %1 不是有效的 Win32 应用程序

    导入的时候报出了 ImportError 在windows上安装python 的模块后,导入模块时报 python ImportError: DLL load failed: %1 不是有效的 Win ...

  7. IIS处理并发请求时出现的问题及解决

    一个ASP.NET项目在部署到生产环境时,当用户并发量达到200左右时,IIS出现了明显的请求排队现象,发送的请求都进入等待,无法及时响 应,系统基本处于不可用状态.因经验不足,花了很多时间精力解决这 ...

  8. 51nod 1138 连续整数的和(数学公式)

    1138 连续整数的和 #include <iostream> #include <cmath> #include <cstdio> using namespace ...

  9. PerconaXtraBackup --全备增备prepare restore

    Xtrabackup Xtrabackup包含两个主要的工具,即xtrabackup和innobackupex,二者区别如下:  • xtrabackup只能备份innodb和xtradb引擎表,而不 ...

  10. shell下批量重命名svn文件的方法

    shell下批量重命名svn文件的方法 目标: 将svn目录下所有文件重命名 , 原文件前缀为 ucc_ , 批量改为 xmd_ 用tree看下当前svn目录 ucc_1.c ucc_1.h ucc_ ...