<%'功能:FSO刪除檔案'來源:http://jorkin.reallydo.com/article.asp?id=484'需要Path函數:http://jorkin.reallydo.com/article.asp?id=401Public Function Del(ByVal sFileName) On Error Resume Next Del = False sFileName = Path(sFileName) Dim oFSO Set
<%'功能:多功能日期格式化函數'來源:http://jorkin.reallydo.com/article.asp?id=477Function FormatDate(sDateTime, sReallyDo) Dim sJorkin sJorkin = GetLocale() If Not IsDate(sDateTime) Then sDateTime = Now() sDateTime = CDate(sDateTime) Select Case
<%'功能:在一個字串前面補全另一字串'來源:http://jorkin.reallydo.com/article.asp?id=452Public Function LFill(ByVal sString, ByVal sStr) Dim i, iStrLen : iStrLen = Len(sStr&"") For i = iStrLen To 1 Step -1 If Right(sStr, i ) = Left(sString, i ) Then
<%'功能:刪除二維數組中的iColumn列上值為sValue的行,當iColumn為-1時刪除第sValue行'來源:http://jorkin.reallydo.com/article.asp?id=483Function DelArray2(aArray, iColumn, sValue, bCompare) If Not IsArray(aArray) Then Exit Function Dim i, j, k, iUBound1,
<%'功能:判斷一個值是否存在於數組'來源:http://jorkin.reallydo.com/article.asp?id=462Function InArray( sValue, aArray ) Dim x InArray = False For Each x In aArray If x = sValue Then InArray = True Exit For End
<%'功能:對一個二維數組的指定列進行排序,DESC為倒序'來源:http://jorkin.reallydo.com/article.asp?id=447'需要Swap過程:http://jorkin.reallydo.com/article.asp?id=446Function SortArray2(ByVal aSortArray(), ByVal iSortColumn, ByVal sSortDirection) On Error Resume Next Dim i,
ASP.Net 1.1後引入了對提交表單自動檢查是否存在XSS(跨站指令碼攻擊)的能力。當使用者試圖用<xxxx>之類的輸入影響頁面返回結果的時候,ASP.Net的引擎會引發一個 HttpRequestValidationExceptioin。預設情況下會返回如下文字的頁面:Server Error in '/YourApplicationPath' ApplicationA potentially dangerous Request.Form value was detected
比較懶,項目上也沒有用到,懶得研究了。今天逛CSDN無意看到有個火柴妞的貼子,就COPY過來了, 我也沒仔細看,以後再看吧,算個參考。原理:替換模板裡的特殊字元。(蔔:還有其它方法嗎?)1、靜態模板頁面 template.html,主要是定義了一些特殊字元,用來被替換。 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">