<%'功能: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
<%'功能:執行SQL語句'來源:http://jorkin.reallydo.com/article.asp?id=487Public Function Exec(sCommand) On Error Resume Next OpenConn() Set Exec = oConn.Execute(sCommand) If Err Then WriteLn Err.Source & ",請檢查您的查詢代碼是否正確。<br />"
<%'功能:擷取XMLDOM的最高版本'來源:http://jorkin.reallydo.com/article.asp?id=433'需要IsObjInstalled函數:http://jorkin.reallydo.com/article.asp?id=163Function getXMLDOM() On Error Resume Next XmlDomVersions = Array("MSXML2.DOMDocument.5.0",
<%'功能:在一個字串前面補全另一字串'來源: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