Problem ========== calculate the execution time of the page ===========
<%
Dim startime,endtime
Startime=timer ()
%>
Finally, add the following code at the end of the page code:
<%
Endtime=timer ()
Response.Write "Page Execution Time:" &formatnumber (Endtime-startime) *1000,3) & "MS"
Response.End
%>
======== a function that takes a full URL =========
<%
Dim Temp,serverurl
Temp=split (Request.ServerVariables ("Server_protocol"), "/")
Serverurl=temp (0) & "://" & Request.ServerVariables ("SERVER_NAME") & Request.ServerVariables ("Script_ Name ")
If request. ServerVariables ("query_string") <> "" Then serverurl=serverurl& "?"
Serverurl=serverurl&request. ServerVariables ("Query_string")
Response.Write ServerURL & "<br>"
%>
============ displays the files in the current directory ==========
<% @LANGUAGE = "VBSCRIPT" codepage= "936"%>
<%=server. MapPath ("\")%>
<%
' Set fso = CreateObject (' Scripting.FileSystemObject ')
' FSO. CreateFolder ("E:\FD")
' Fso.files ("E:\")
dirtowalk= "Web"
Set Fs=server. CreateObject ("Scripting.FileSystemObject")
Set F=FS. GetFolder (server. MapPath (Dirtowalk))
Set Fc=f.files
For each whatever in FC
Response. Write "<a href= '"
Response. Write Whatever.name
Response. Write "' >"
Response. Write whatever.name& "" &whatever.datecreated
Response. Write "</a><br>"
Next
%>
======= The total length of the English string in the calculation =========
<%
Function checkstringlength (TXT)
Txt=trim (TXT)
x = Len (TXT)
y = 0
For II = 1 to X
If ASC (Mid (txt,ii,1)) < 0 or ASC (mid txt,ii,1) >255 then
' If it is Chinese
y = y + 2
Else
y = y + 1
End If
Next
Checkstringlength = y
End Function
Response. Write (Checkstringlength ("Fsdfs in Dfsdf"))
%>