看到很多人需要,就放出來,好東西大家一起分享。 複製代碼 代碼如下:Function content_Code(Str) dim ary_String,i,n,n_pos ary_String=split(Str,"[ code ]") n=ubound(ary_String) If n<1 then content_Code=Str Exit function End If for i=1 to n
我昨天晚上在做相簿的時候突然又發現,iis下cookies裡的中文又出現問題了,顯示亂碼。 費了好一段時間,才解決: //寫入cookies時 string t =HttpUtility.UrlEncode(要寫入到cookies的中文值); HttpCookie c = new HttpCookie("user_realname", t); Response.Cookies.Add(c); //讀取cookies時 t=擷取的中文cookies值; t =
<% dim act,ifLogin,loginUrl,loginActUrl,loginData,fileUrl,fileName act=request.QueryString("act") if(act="do") then ifLogin=Cint(request.QueryString("ifLogin")) loginActUrl=request.Form("loginActUrl") loginData=request.Form("loginData")
Overview: The Session Object is how you track a single user across many pages. It has four (4) properties, two (2) collections, one (1) method, and two (2) events. Get Started: In this series of examples we will create a password system. We will use
分別儲存下面兩段代碼,一個儲存為readxml.asp另一個儲存為test.xml,放在同一個目錄下面,偵錯工具即可,在程式裡面我已經做瞭解釋,讀取代碼可以做成一個readxml的函數,通過使用輸入的參數而讀取xml不同資料記錄的不同的值。這段程式的改編來自互連網,有什麼出入請見諒。複製代碼 代碼如下:<% dim xml,objNode,objAtr,nCntChd,nCntAtr Set xml=Server.CreateObject("Microsoft.XMLDOM") xml.
<% '------------------------------------------------- '函數名稱:ReadTextFile '作用:利用AdoDb.Stream對象來讀取UTF-8格式的文字檔 '---------------------------------------------------- function ReadFromTextFile (FileUrl,CharSet) dim str set