Function 1. Check for valid mailing address functioncheckemail (stremail)
Dimre
Setre=newregexp
Re. Pattern= "^[w-." {1,}@ ([Da-za-z-]{1,}.) {1,} [da-za-z-] {2,3}$ "
Re. Ignorecase=true
Checkemail=re. Test (Stremail)
Endfunction
2. Test whether the variable is null, the meaning of the null value includes: The variable does not exist/is empty, the object is nothing,0, an empty array, the string is empty Functionisblank (Byrefvar)
Isblank=false
Selectcasetrue
Caseisobject (Var)
Ifvarisnothingthenisblank=true
Caseisempty (Var), IsNull (Var)
Isblank=true
Caseisarray (Var)
Ifubound (Var) =0thenisblank=true
Caseisnumeric (Var)
If (var=0) thenisblank=true
Caseelse
Iftrim (Var) = "" Thenisblank=true
Endselect
Endfunction
3. Get the browser current Urlfunctiongetcururl ()
Ifrequest.servervariables ("HTTPS") = "on" Then
Getcurrenturl= "https://"
Else
Getcurrenturl= "http://"
EndIf
Getcururl=getcururl&request.servervariables ("SERVER_NAME")
If (Request.ServerVariables ("Server_port") <>80) thengetcururl=getcururl& ":" & Request.ServerVariables ("Server_port")
Getcururl=getcururl&request.servervariables ("URL")
If (request.querystring<> "") thengetcururl=getcururl& "?" &request.querystring
Endfunction
4.MD5 encryption Function Privateconstbits_to_a_byte=8
Privateconstbytes_to_a_word=4
Privateconstbits_to_a_word=32
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.