複製代碼 代碼如下:Function getCurrentUrl() On Error Resume Next Dim strTemp If LCase(Request.ServerVariables("HTTPS")) = "off" Then strTemp = "http://" Else strTemp = "https://" End If strTemp = strTemp & Request.ServerVariables("SERVER_NAME") If
複製代碼 代碼如下: <% Dim oConn, ors, aRows Dim i,j Set oConn=Server.CreateObject("ADODB.Connection") oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("database/newasp.resx") Set ors=oConn.Execute("Select TOP 5 SoftID,SoftName
asp函數代碼 複製代碼 代碼如下: <% Function RemoveHTML(str) Dim objRegExp, Match,strHTML if isnull(str) then str="" end if strHTML=str strHTML=replace(replace(replace(strHTML,vblf,""),vbcr,""),vbcrlf,"") Set objRegExp = New Regexp objRegExp.IgnoreCase = True
方法一: 複製代碼 代碼如下: id=request.form("checkbox") id=Split(id,",") shu=0 for i=0 to UBound(id) sql="select * from jiang_fname where id="&id(i) set rs=conn.execute(sql) if not rs.eof then delete_file(rs("fname")) end if rs.close set rs=nothing sql="delete
ASP木馬防禦: 複製代碼 代碼如下: const adTypeBinary=1 dim jpg(1):jpg(0)=CByte(&HFF):jpg(1)=CByte(&HD8) dim bmp(1):bmp(0)=CByte(&H42):bmp(1)=CByte(&H4D) dim png(3):png(0)=CByte(&H89):png(1)=CByte(&H50):png(2)=CByte(&H4E):png(3)=CByte(&H47) dim gif(5):gif(0)=CByte(
using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls;