AspÖÐÒþ²ØÏÂÔØµØÖ·
<%
Response.Buffer = true
Response.Clear
dim url
Dim fso,fl,flsize
dim Dname
Dim objStream,ContentType,flName,isre,url1
Dim strFileName
strFileName=replace(replace(Request("file"),"\",""),"/","") '´«²Î
strFileName="/files/"&strFileName ' ¸Ä³ÉÄãÄãÎļþµÄ´æ·Å·¾¶
If strFileName<>"" Then
'******************************ÏÂÔØÎļþ´æ·ÅµÄ·þÎñ¶ËĿ¼
url=Server.MapPath(strFileName)
else
Response.Write("no found")
Response.end
End If
Set fso=Server.CreateObject("Scripting.FileSystemObject")
Set fl=fso.getfile(url)
flsize=fl.size
flName=fl.name
Set fl=Nothing
Set fso=Nothing
Set objStream = Server.CreateObject("ADODB.Stream")
objStream.Open
objStream.Type = 1
objStream.LoadfromFile url
Select Case lcase(Right(flName, 4))
Case ".asf"
ContentType = "video/x-ms-asf"
Case ".avi"
ContentType = "video/avi"
Case ".doc"
ContentType = "application/msword"
Case ".zip"
ContentType = "application/zip"
Case ".xls"
ContentType = "application/vnd.ms-excel"
Case ".gif"
ContentType = "image/gif"
Case ".jpg", "jpeg"
ContentType = "image/jpeg"
Case ".bmp"
ContentType = "image/bmp"
Case ".ppt"
ContentType = "application/vnd.ms-powerpoint"
Case ".mdb"
ContentType = "application/x-msaccess"
Case ".wav"
ContentType = "audio/wav"
Case ".mp3"
ContentType = "audio/mpeg3"
Case ".mpg", "mpeg"
ContentType = "video/mpeg"
Case ".rtf"
ContentType = "application/rtf"
Case ".htm", "html" ,"htm(1)"
ContentType = "text/html"
Case ".txt"
ContentType = "text/plain"
Case Else
ContentType = "application/octet-stream"
End Select
' ÎÒÊÇÓÃUPload×é¼þÉÏ´«µÄ,Èç¹ûÖØÃû»á²úÉú"(Êý×Ö)" ºó׺,
' ÓÐЩÖ÷»ú»á×èÖ¹ÏÂÔØÕâÀàÎļþ,ËùÒÔÕâÀï¼ÓÒ»¸ö¼ì²é,½«Upload×é¼þ×Ô¶¯Éú³ÉµÄºó׺
If InStr(lcase(Right(flName, 1)),")") Then
flName=mid(flName,1,Len(flName)-3)
End If
Response.AddHeader "Content-Disposition", "attachment; filename=" &
Ïà¹ØÎĵµ£º
1£®Í¨¹ýODBC»òÕßOLE·½Ê½Á¬½ÓµÄÇø±ð£¿
ÏÖÔÚÓÐÁ½ÖÖÁ¬½ÓÊý¾Ý¿âµÄ·½·¨¡£Ò»·½Ã棬¿ÉÒÔÓÃODBC²úÉúÒ»¸öÁ¬½Ó£¬ÕâÖÖÁ¬½ÓÓëÈκÎÓÐODBCÇý¶¯Æ÷µÄÊý¾Ý¿â£¨¼´»ù±¾ÉÏÊÇÊг¡ÉÏËùÓеÄÊý¾Ý¿â£©¼æÈÝ£»ÁíÒ»·½Ã棬¿ÉÒÔÓÃÔʼOLE DBÌṩÉ̲úÉúÒ»¸öÁ¬½Ó¡£
¸ÃÓÃÄĸöÌṩÉÌ£¿¾¡¿ÉÄÜÓÃÔʼOLE DBÌṩÉÌ£¬ÒòΪËüÌṩÁ˶ÔÊý¾Ý¸üÓÐЧµÄ·Ã ......
Macromedia Dreamweaver MX ÊÇÒ»¿îרҵµÄ HTML ±à¼Æ÷£¬ÓÃÓÚ¶Ô Web Õ¾µã¡¢Web Ò³ºÍ Web Ó¦ÓóÌÐò½øÐÐÉè¼Æ¡¢±àÂëºÍ¿ª·¢¡£ÎÞÂÛÄúÔ¸ÒâÏíÊÜÊÖ¹¤±àд HTML ´úÂëʱµÄ¼ÝÔ¦¸Ð»¹ÊÇÆ«°®ÔÚ¿ÉÊÓ»¯±à¼»·¾³Öй¤×÷£¬Dreamweaver ¶¼»áΪÄúÌṩÓÐÓõŤ¾ß£¬Ê¹ÄúÓµÓиü¼ÓÍêÃÀµÄ Web ´´×÷ÌåÑé¡£ Dreamweaver ʹÄú¿ÉÒÔʹÓ÷þÎñÆ÷¼¼Êõ(ÀýÈç CFML ......
¸øÄãÒ»¸ö΢ÈíµÄ¼ÓÃܺö«¶«£º
Script Encoder ÏÂÔØµØÖ·£º
http://msdn.microsoft.com/scripting/vbscript/download/x86/sce10en.exe
Windows Script Engine 5.0
Windows ......
Ö÷Ŀ¼,ÅäÖÃϱðÍüÁËÆôÓø¸Ä¿Â¼
ÎÊÌâÖ¢×´£º
ADODB.Connection ´íÎó '800a0ea9' δָ¶¨Ìṩ³ÌÐò£¬Ò²Ã»ÓÐÖ¸ÅɵÄĬÈÏÌṩ³ÌÐò¡£
ÎÊÌâ·ÖÎö£º
Windows 64λµÄϵͳÉÏ£¬ÔËÐÐÏÂÁÐ32bit(λ)Ó¦ÓóÌÐò£¬²»Äܹ»ÍêÈ«¼æÈÝ£¬ÐèÒª¶ÀÁ¢²Ù×÷½â¾ö¡£³ÌÐòÁбíÈçÏ£º
Internet·þÎñAPIÀ©Õ¹
ISAPI¹ýÂËÆ÷
ASPÓ¦ÓóÌÐò
ASP.NETÓ¦ÓóÌÐò
½ ......