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=" &
Ïà¹ØÎĵµ£º
ÔõôÑùµÄÐéÄâÖ÷»úËãÊǺõÄÖ÷»úÄØ£¿Ò»°ãÀ´Ëµ£¬´ó¼Ò¹ºÂòµÄÐéÄâÖ÷»ú¶¼ÊÇasp ..net »òÕßphpµÄ¡£javaÐéÄâÖ÷»úÒ»°ã±È½ÏÉÙ¡£ÕâºÍjavaÐéÄâÖ÷»úµÄά»¤ÄѶȺͳɱ¾½Ï¸ßÓйء£¶øÇÒjava¶ÔÓÚÍøÕ¾ÓµÓÐÕߵļ¼ÊõÒªÇóÒ²¸ßÓÚaspºÍphp¡£ Ò»°ãÀ´Ëµ£¬Ðí¶ ......
¸øÄãÒ»¸ö΢ÈíµÄ¼ÓÃܺö«¶«£º
Script Encoder ÏÂÔØµØÖ·£º
http://msdn.microsoft.com/scripting/vbscript/download/x86/sce10en.exe
Windows Script Engine 5.0
Windows ......
ÉÏÏÂÎĶÔÏó
===================================
Ò»ÖÖ¶ÔÏó£¬Ëüµ±MTS·þÎñÆ÷×é¼þÔÚÒ»¸ö»î¶¯ÖÐÔËÐÐʱ¸ú×Ù¸Ã×é¼þµÄÊôÐÔ£¬°üÀ¨±»¸ú×Ù×é¼þµÄ¼¤»î״̬¡¢°²È«ÐÅÏ¢¡¢ÊÂÎñ´¦Àí״̬£¨Èç¹û´æÔÚ£©µÈ¡£ÕâÑù¾ÍÃâ³ýÁËÈÃ×é¼þÈ¥¸ú×ÙÆä×ÔÉí״̬¡£
ÉÏÏÂÎĶÔÏóÊÇweb·þÎñÆ÷ÉÏ»ùÓÚwebÓ¦ÓõÄÒ»¸ö±³¾°»·¾³¶ÔÏó£¬ÉÏÏÂÎĶÔÏóÌṩÁËÒ»¸öͬһwebÓ¦Óà ......
session
===================================
session¶ÔÏóÓÃÓÚ´æ´¢ÌØ¶¨µÄÓû§»á»°ËùÐèµÄÐÅÏ¢ ¡£ Session¶ÔÏóµÄÒýÈëÊÇΪÁËÃÖ²¹HTTPÐÒéµÄ²»×㣬HTTPÐÒéÊÇÒ»ÖÖÎÞ״̬µÄÐÒé¡£
¡¡¡¡SessionÖÐÎÄÊÇ“»á»°”µÄÒâ˼£¬ÔÚASPÖдú±íÁË·þÎñÆ÷Óë¿Í»§¶ËÖ®¼äµÄ“»á»°”¡£SessionµÄ×÷ÓÃʱ¼ä´ÓÓû§µ½´ïij¸öÌØ¶¨µÄ ......