複製代碼 代碼如下: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
複製代碼 代碼如下:'===================================== '獲得檔案尾碼 '===================================== Function Get_Filetxt(ByVal t0) Dim t1 IF Len(t0)<2 Or Instr(t0,".")=0 Then Get_Filetxt=False:Exit Function t1=Split(t0,".")
複製代碼 代碼如下:'============================== '格式化HTML,SDCMS加強版 '============================== Function Nohtml(ByVal t0) IF Len(t0)=0 Or IsNull(t0) Then Nohtml="" Exit Function End IF Dim Regs,Matches,Match Set Regs=New Regexp Regs.Ignorecase=True Regs.
複製代碼 代碼如下:'===================================== '轉換內容,防止意外 '===================================== Function Content_Encode(ByVal t0) IF IsNull(t0) Or Len(t0)=0 Then Content_Encode="" Else Content_Encode=Replace(t0,"<","<")
複製代碼 代碼如下:'===================================== '擷取內容中所有圖片 '===================================== Function Get_ImgSrc(ByVal t0) Dim t1,Regs,Matches,Match t1="" IF Not(IsNull(t0) Or Len(t0)=0) Then Set Regs=New RegExp
複製代碼 代碼如下: <% 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
下面的代碼是從kesion系統扒下的,確實不錯,支援utf8格式。複製代碼 代碼如下:'================================================ '函數名:URLDecode '作 用:URL解碼 '================================================ Function URLDecode(ByVal urlcode) Dim start,final,length,char,i,butf8,pass Dim
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;