Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

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


Ïà¹ØÎĵµ£º

[TestComplete ϵÁÐ]VB¼ì²é±àÂëÀàÐÍ

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 ......

ASpÁ¬½ÓÊý¾Ý¿â

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 ......

aspÒ³Ãæ³öÏÖÂÒÂë

½ñÌìÔÚÓÃutf-8±àÂëÓÃÔÚеÄÍøÕ¾ÉÏ£¬²»ÏëÎÊÌ⻹Õæ¶à£¬ËùÒÔÕÒÁËЩÎÄÕ£¬Ìû×Ó£¬¿´ÁË¿´£¬µÈÏÂÓÐÓõľÍÌùÏÂÃæÁË¡£
½ñÌ죬ÎÒ¿ªÊ¼°Ñ CODEPAGE="936" ¸Ä³É CODEPAGE="65001"
°Ñcharset=gb2312¸Ä³É charset=utf-8
¿ÉÊÇ»¹ÊÇÂÒÂ룬ֻҪÊǽű¾Óõĵط½»¹ÊÇÂÒÂ룬ÏÖÔÚÖÕÓÚÕÒµ½ÎÊÌâÁË£¬¾ÍÊǵ±½Å±¾Êä³öʱºò£¬ÒªÒÔutf-8±àÂëÊä³ö¡£
¾ÍÊÇ ......

ìÓë¶Ü:ÓÃVB´òÔìÇý¶¯¼¶¼üÅ̼ǼÆ÷,ÄܹýQQÃÜÂë¿ò(Ô´Âë)

¡¡¡¡ÐÅÏ¢¼à¿ØÓëÒþ˽±£»¤ÓÀÔ¶ÊÇÒ»¶Ôì¶Ü¡£
       ÔÚ¶Ô¸¶¸÷ÖÖÐÅÏ¢ÇÔÈ¡Èí¼þÉÏ¡£
       Ð¼¼Êõ×ÜÊDzã³ö²»Çî¡£±¾ÎĽéÉÜÒ»ÖÖ¹ÅÀϵļüÅ̼ǼÆ÷¼¼Êõ£¬È·ÊµºÜ¹ÅÀÏ¡£
       DOSʱ´úÈËÃǾÍÔÚÓÃÁË¡£
       µ«ÊÇÏÖÔÚËüÈÔÈ»ºÜÓÐЧ£¬ÔÚ¼üÅ̹ýÂËÇ ......

¹ØÓÚASP Recordset ·ÖÒ³³öÏÖ¸ºÊý½â¾ö·½·¨¼°½¨Òé


¶ÔÓÚRecordset·Öҳʱ³öÏÖ¸ºÊýµÄÏÖÏó£¬ÏàÐÅ»áÓкܶàÈËÓöµ½¹ýÕâ¸öÎÊÌ⣬ÓÐʱ°Ù¶È¡¢GOOGLEÒ²²»µÃÆä½â£¬ÏÖÔÚÓÉÎÒÀ´×ܽáһϡ£
³öÏÖ¸ºÊý£¬Ö÷ÒªºÍÓαêÀàÐÍÓйØϵ¡££¨Îª¾ÙÀý·½±ã£¬¼ÙÉèÒѾ­ÓÐÒ»¸öconn.aspÁ´½ÓÊý¾Ý¿âµÄÎļþ²¢ÇÒÒѾ­include£©ÏÖÔÚ¾ÙÒ»¸öÀý×Ó£¬´úÂëÈçÏ£º
'===================================================== ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ