文件上传&下载经典的asp [英] File Upload& Download in classic asp

查看:63
本文介绍了文件上传&下载经典的asp的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望文件上传和下载在经典的asp。

I want File Upload & download in classic asp.

推荐答案

http://classicasp.aspfaq.com/forms/how-do-i-upload-files-from-the-client- to-the-server.html [ ^ ]

经典ASP:ASP文件上传器 [ ^ ]

http://aspuploader.com/demo.html [ ^ ]
http://classicasp.aspfaq.com/forms/how-do-i-upload-files-from-the-client-to-the-server.html[^]
Classic ASP: ASP File Uploader[^]
http://aspuploader.com/demo.html[^]


<%@  language="VBScript" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script language="javascript" type="text/javascript">
        function checkImage(img) {
            if (img != '' && img.substring(img.length - 3, img.length).toLowerCase() != 'jpg' && img.substring(img.length - 3, img.length).toLowerCase() != 'gif' && img.substring(img.length - 3, img.length).toLowerCase() != 'bmp' && img.substring(img.length - 3, img.length).toLowerCase() != 'png')
                return true
            else
                return false
        }
        function check() {
            var str = '';
            var strFocus = '';
            var img = document.frmCategory.Cat_Image.value;
            if (checkImage(img)) {
                str += "Select proper image.";
                if (strFocus == '') strFocus = 'Cat_Image';
            }
            if (str != '') {
                alert(str);
                if (document.getElementById(strFocus) != null)
                    document.getElementById(strFocus).focus();
                return false;
            }
        }
    </script>
</head>
<body>
    <form method="post" action="" id="frmCategory" name="frmCategory" onsubmit="return check();">
    <input type="file" id="Cat_Image" name="Cat_Image" value="" />
    <img src="images/save.jpg" alt="Save" width="60" height="20" border="0" onclick="javascript:check();" />
    </form>
</body>
</html>





AND



下载只需指定文件位置的完整路径即可。例如点击此处


这篇关于文件上传&amp;下载经典的asp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆