揭秘asp常用函數庫大全(6)_ASP教程

      編輯Tag賺U幣
      教程Tag:暫無Tag,歡迎添加,賺取U幣!

      推薦:詳解將ASP頁面改為偽靜態的簡單方法
      目前很多網站都采用生成靜態頁的方法,原因是這樣訪問速度會得到提高(服務器端CPU利用率很低),另外也容易被搜索引擎收錄,但是這帶來的一個問題就是需要足夠大的空間存放這些靜態頁面,如果你的空間不是很富裕,而又想有利于被搜索引擎收錄,其實可以采用偽


      Function Date2Chinese(iDate) ’獲得ASP的中文日期字符串
          Dim num(10)
          Dim iYear
          Dim iMonth
          Dim iDay

          num(0) = "〇"
          num(1) = "一"
          num(2) = "二"
          num(3) = "三"
          num(4) = "四"
          num(5) = "五"
          num(6) = "六"
          num(7) = "七"
          num(8) = "八"
          num(9) = "九"

          iYear = Year(iDate)
          iMonth = Month(iDate)
          iDay = Day(iDate)
          Date2Chinese = num(iYear \ 1000) + num((iYear \ 100) Mod 10) + num((iYear\ 10) Mod 10) + num(iYear Mod 10) + "年"
          If iMonth >= 10 Then
              If iMonth = 10 Then
                  Date2Chinese = Date2Chinese + "十" + "月"
              Else
                  Date2Chinese = Date2Chinese + "十" + num(iMonth Mod 10) + "月"
              End If
          Else
              Date2Chinese = Date2Chinese + num(iMonth Mod 10) + "月"
          End If
          If iDay >= 10 Then
              If iDay = 10 Then
                  Date2Chinese = Date2Chinese +"十" + "日"
              ElseIf iDay = 20 or iDay = 30 Then
                  Date2Chinese = Date2Chinese + num(iDay \ 10) + "十" + "日"
              ElseIf iDay > 20 Then
                  Date2Chinese = Date2Chinese + num(iDay \ 10) + "十" +num(iDay Mod 10) + "日"
              Else
                 Date2Chinese = Date2Chinese + "十" + num(iDay Mod 10) + "日"
              End If
          Else
              Date2Chinese = Date2Chinese + num(iDay Mod 10) + "日"
          End If
      End Function


      Function lenStr(str)’計算字符串長度(字節)
          dim l,t,c
          dim i
          l=len(str)
          t=0
      for i=1 to l
          c=asc(mid(str,i,1))
          if c<0 then c=c+65536
          if c<255 then t=t+1
          if c>255 then t=t+2
      next
         lenstr=t
      End Function

      Function CreateArr(str) ’生成二維數組 數據如:"1,a1,b1,c1,d1|2,a2,b2,c2,d2|5,a3,b3,c3,d3|8,a4,b4,c4,d4"
      dim arr()
      str=split(str,"|")
      for i=0 to UBound(str)
          arrstr=split(str(i),",")
          for j=0 to Ubound(arrstr)
              ReDim Preserve arr(UBound(str),UBound(arrstr))
              arr(i,j)=arrstr(j)
          next
      next
      CreateArr=arr
      End Function

      分享:解析有關eWebEditor網頁編輯器的漏洞
      首先介紹編輯器的一些默認特征: 默認登陸admin_login.asp 默認數據庫db/ewebeditor.mdb 默認帳號admin密碼admin或admin888 在baidu/google搜索inurl:ewebeditor 幾萬的站起碼有幾千個是具有默認特征的,那么試一下默認后臺 http://www.xxx.com.cn/admin/eweb

      共6頁上一頁123456下一頁
      來源:模板無憂//所屬分類:ASP教程/更新時間:2010-04-24
      相關ASP教程