'函數名:CodeCookie
'作 用:Cookie防亂碼寫入時用
'參 數:str ---- 字符串
'返回值:整理後的字符串
'示 例:
'**************************************************
Public Function CodeCookie(str)
If isNumeric(str) Then str=Cstr(str)
Dim newstr
newstr=""
For i=1 To Len(str)
newstr=newstr & ascw(mid(str,i,1))
If i<> Len(str) Then newstr= newstr & "a"
Next
CodeCookie=newstr
End Function
'**************************************************
'作 用:Cookie防亂碼寫入時用
'參 數:str ---- 字符串
'返回值:整理後的字符串
'示 例:
'**************************************************
Public Function CodeCookie(str)
If isNumeric(str) Then str=Cstr(str)
Dim newstr
newstr=""
For i=1 To Len(str)
newstr=newstr & ascw(mid(str,i,1))
If i<> Len(str) Then newstr= newstr & "a"
Next
CodeCookie=newstr
End Function
'**************************************************
'函數名:DecodeCookie
'作 用:Cookie防亂碼讀出時用
'參 數:str ---- 字符串
'返回值:整理後的字符串
'示 例:
'**************************************************
Public Function DecodeCookie(str)
DecodeCookie=""
Dim newstr
newstr=Split(str,"a")
For i = LBound(newstr) To UBound(newstr)
DecodeCookie= DecodeCookie & chrw(newstr(i))
Next
End Function
'作 用:Cookie防亂碼讀出時用
'參 數:str ---- 字符串
'返回值:整理後的字符串
'示 例:
'**************************************************
Public Function DecodeCookie(str)
DecodeCookie=""
Dim newstr
newstr=Split(str,"a")
For i = LBound(newstr) To UBound(newstr)
DecodeCookie= DecodeCookie & chrw(newstr(i))
Next
End Function