ASP VB.NET ÏÂÔØ·þÎñÆ÷Îļþµ½¿Í»§¶Ë
Try
Dim Path As String = Server.MapPath("~/Download/") 'Îļþ·¾¶
Path = Path & "file.txt" 'ÎļþµÄÃû³Æ
If Not System.IO.File.Exists(Path) Then
‘Èç¹ûÎļþ²»´æÔÚ
Exit Sub
Else
Response.ContentType = "application/x-zip-compressed"
Response.AddHeader("Content-Disposition", "attachment;filename=" + Server.UrlPathEncode(Path))
Response.TransmitFile(Path)
End If
Catch ex As Exception
'ÎļþÏÂÔØʧ°Ü£¡
End Try
Ïà¹ØÎĵµ£º
Sub CheckTextCodingType(Textfile)
Set fl = aqFile.OpenBinaryFile(Textfile, aqFile.faRead)
Binary1 = fl.ReadByte()
Binary2 = fl.ReadByte()
fl.Close
select case CStr(Binary1)& CStr(Binary2)
case 255254: '*Unicode (UTF-16) Ç°Á½¸ö×Ö½ÚΪFFFE
Log.Message("fi ......
1. ASPÁ¬½ÓAccessÊý¾Ý¿âÓï¾ä
Set Conn=Server.CreateObject("ADODB.Connection")
Connstr="DBQ="+server.mappath("www/bbs.mdb")+";DefaultDir=;DRIVER={Microsoft
AccessDriver(*.mdb)};"
Conn.Open connstr
ÆäÖÐSet Conn=Server.CreateObject("ADODB.Connection")Ϊ½¨Á¢Ò»¸ö·ÃÎÊÊý¾ÝµÄ¶ÔÏó
server.mappath("w ......
½ñÌìÔÚÓÃutf-8±àÂëÓÃÔÚеÄÍøÕ¾ÉÏ£¬²»ÏëÎÊÌ⻹Õæ¶à£¬ËùÒÔÕÒÁËЩÎÄÕ£¬Ìû×Ó£¬¿´ÁË¿´£¬µÈÏÂÓÐÓõľÍÌùÏÂÃæÁË¡£
½ñÌ죬ÎÒ¿ªÊ¼°Ñ CODEPAGE="936" ¸Ä³É CODEPAGE="65001"
°Ñcharset=gb2312¸Ä³É charset=utf-8
¿ÉÊÇ»¹ÊÇÂÒÂ룬ֻҪÊǽű¾Óõĵط½»¹ÊÇÂÒÂ룬ÏÖÔÚÖÕÓÚÕÒµ½ÎÊÌâÁË£¬¾ÍÊǵ±½Å±¾Êä³öʱºò£¬ÒªÒÔutf-8±àÂëÊä³ö¡£
¾ÍÊÇ ......
¡¡¡¡ÐÅÏ¢¼à¿ØÓëÒþ˽±£»¤ÓÀÔ¶ÊÇÒ»¶Ôì¶Ü¡£
ÔÚ¶Ô¸¶¸÷ÖÖÐÅÏ¢ÇÔÈ¡Èí¼þÉÏ¡£
м¼Êõ×ÜÊDzã³ö²»Çî¡£±¾ÎĽéÉÜÒ»ÖÖ¹ÅÀϵļüÅ̼ǼÆ÷¼¼Êõ£¬È·ÊµºÜ¹ÅÀÏ¡£
DOSʱ´úÈËÃǾÍÔÚÓÃÁË¡£
µ«ÊÇÏÖÔÚËüÈÔÈ»ºÜÓÐЧ£¬ÔÚ¼üÅ̹ýÂËÇ ......
¶ÔÓÚRecordset·Öҳʱ³öÏÖ¸ºÊýµÄÏÖÏó£¬ÏàÐÅ»áÓкܶàÈËÓöµ½¹ýÕâ¸öÎÊÌ⣬ÓÐʱ°Ù¶È¡¢GOOGLEÒ²²»µÃÆä½â£¬ÏÖÔÚÓÉÎÒÀ´×ܽáһϡ£
³öÏÖ¸ºÊý£¬Ö÷ÒªºÍÓαêÀàÐÍÓйØϵ¡££¨Îª¾ÙÀý·½±ã£¬¼ÙÉèÒѾÓÐÒ»¸öconn.aspÁ´½ÓÊý¾Ý¿âµÄÎļþ²¢ÇÒÒѾinclude£©ÏÖÔÚ¾ÙÒ»¸öÀý×Ó£¬´úÂëÈçÏ£º
'===================================================== ......