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
Ïà¹ØÎĵµ£º
<%
set rs=server.createobject("adodb.recordset")
sql="select * from YONGHU where (ID is null)"
rs.open sql,conn,1,3
rs.addnew
rs("USERNAME")=request("username")
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
session("username")=rs("name")
respo ......
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 ......
¡¡¡¡ÐÅÏ¢¼à¿ØÓëÒþ˽±£»¤ÓÀÔ¶ÊÇÒ»¶Ôì¶Ü¡£
ÔÚ¶Ô¸¶¸÷ÖÖÐÅÏ¢ÇÔÈ¡Èí¼þÉÏ¡£
м¼Êõ×ÜÊDzã³ö²»Çî¡£±¾ÎĽéÉÜÒ»ÖÖ¹ÅÀϵļüÅ̼ǼÆ÷¼¼Êõ£¬È·ÊµºÜ¹ÅÀÏ¡£
DOSʱ´úÈËÃǾÍÔÚÓÃÁË¡£
µ«ÊÇÏÖÔÚËüÈÔÈ»ºÜÓÐЧ£¬ÔÚ¼üÅ̹ýÂËÇ ......
1¡¢Ê×ÏÈÏÂÔØÌÔÌØÕ¾ÄÚËÑË÷ÒýÇæ£¬Ê×ÏÈÒªµ¼ÈëCMSÖеÄÊý¾Ýµ½ËÑË÷ÒýÇæË÷ÒýÖУ¬Õâ¸ö¹¤×÷Äú¿ÉÒԷŵ½±¾µØÀ´×ö£¬Ë÷Òýºó£¬Ö±½Ó½«ÌÔÌØËÑË÷ÒýÇæÎļþ¼ÐѹËõºóÉÏ´«µ½ÄúµÄ¿Õ¼äÉϼ´¿É¡£
2¡¢Êý¾ÝË÷Òý˵Ã÷£º
3¡¢Ê×ÏÈÔÚ±¾µØ²¿ÊðÒ»¸öasp.net»·¾³£¬È»ºó°²×°ÌÔÌØÕ¾ÄÚËÑË÷ÒýÇæ£¬¼ÙÈç·ÃÎʵØÖ·ÊÇ:http://localhost¡£
4¡¢ÏÂÃæÊäÈëµØÖ·£ºhttp://lo ......