<%
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>"
%>
============显示以后目次下所以的文件==========
<%@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
%>
=======盘算中英文字符串的总长度=========
<%
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
' 假如是中文
y = y + 2
else
y = y + 1
end if
next
CheckStringLength = y
End Function
response.Write(CheckStringLength("fsdfs地在在dfsdf"))
%>