时间:2021-05-18
复制代码 代码如下:
<%
DimCmd
SetCmd=NewCls_Command
ClassCls_Command
PrivateRe
PublicFunctionIsPositiveInteger(value)
SetRe=NewRegExp
Re.Pattern="^[1-9][\d]*$"
Re.IgnoreCase=True
Re.Global=True
IsPositiveInteger=Re.Test(value)
SetRe=Nothing
EndFunction
PublicFunctionIsDigit(vString)
IfvString=""ThenIsDigit=False:ExitFunction
SetRe=NewRegExp
Re.Pattern="^[a-z]+$"
Re.Global=True
Re.IgnoreCase=True
Re.MultiLine=True
IsDigit=Re.Test(vString)
SetRe=Nothing
EndFunction
PublicFunctionIsAlpha(vString)
IfvString=""ThenIsAlpha=False:ExitFunction
SetRe=NewRegExp
Re.Pattern="^[\d]+$"
Re.Global=True
Re.IgnoreCase=True
Re.MultiLine=True
IsAlpha=Re.Test(vString)
SetRe=Nothing
EndFunction
PublicFunctionIsAlphaDigit(vString)
IfvString=""ThenIsAlphaDigit=False:ExitFunction
SetRe=NewRegExp
Re.Pattern="^[a-zA-Z\d]+$"
Re.Global=True
Re.IgnoreCase=True
Re.MultiLine=True
IsAlphaDigit=Re.Test(vString)
SetRe=Nothing
EndFunction
DimTemplateContent,TemplateDeBug
PublicSubLoadTemplate(TemplateName)
OnErrorResumeNext
DimTemplateObject,TemplateFile
SetTemplateObject=Server.CreateObject("Scripting.FileSystemObject")
SetTemplateFile=TemplateObject.OpenTextFile(Server.MapPath(TemplateName))
IfErr.Number<>0Then
Err.Clear
SetTemplateFile=Nothing
SetTemplateObject=Nothing
TemplateDeBug=1
EndIf
TemplateContent=TemplateFile.ReadAll
TemplateFile.Close
SetTemplateFile=Nothing
SetTemplateObject=Nothing
EndSub
DimHtmlContent,CreatDeBug
PublicSubBuildFile(Catalogue,HtmlName)
OnErrorResumeNext
IfNotCheckFolder(Catalogue)Then
CreatDeBug=1
ExitSub
EndIf
DimCreatObject,CreatFile
SetCreatObject=Server.CreateObject("Scripting.FileSystemObject")
SetCreatFile=CreatObject.CreateTextFile(Server.MapPath(Catalogue&HtmlName),True,False)
IfErr.Number<>0Then
SetCreatFile=Nothing
SetCreatObject=Nothing
Err.Clear
CreatDeBug=1
ExitSub
EndIf
CreatFile.Write(HtmlContent)
CreatFile.Close
SetCreatFile=Nothing
SetCreatObject=Nothing
EndSub
PrivateFunctionCheckFolder(byvalLocalPath)
OnErrorResumeNext
DimFileObject
Dimpatharr,path_level,pathtmp,cpath
LocalPath=Replace(LocalPath,"\","/")
SetFileObject=Server.CreateObject("Scripting.FileSystemObject")
patharr=Split(LocalPath,"/")
path_level=Ubound(patharr)
Dimi
Fori=0topath_level
Ifi=0Then
pathtmp=patharr(0)&"/"
Else
pathtmp=pathtmp&patharr(i)&"/"
EndIf
cpath=Left(pathtmp,Len(pathtmp)-1)
IfNotFileObject.FolderExists(Server.MapPath(cpath))ThenFileObject.CreateFolder(Server.MapPath(cpath))
Next
SetFileObject=Nothing
IfErr.Number<>0then
Err.Clear
CheckFolder=False
Else
CheckFolder=True
EndIf
EndFunction
PublicFunctionWriteCache(appName,Value)
Application.Lock
Application(appName)=Value
Application.Unlock
EndFunction
PublicFunctionClearCache(appName)
Application.Lock
Application.Contents.Remove(appName)
Application.UnLock
EndFunction
PublicSubOutputJavaInfo(Message)
Response.Expires=0
Response.ExpiresAbsolute=Now()-1
Response.AddHeader"pragma","no-cache"
Response.AddHeader"cache-control","private"
Response.CacheControl="no-cache"
Response.ContentType="application/x-javascript"
Response.Write"document.getElementById(""updateinfo"").innerHTML="""&Message&""";"
Response.End
EndSub
PublicSubOutputinterHtml(Message,ShowType)
Response.WriteMessage
IfShowType=1Then
Response.Flush
Else
Response.End
EndIf
EndSub
EndClass
%>
声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。
用到的类及函数:source/class/discuz/discuz_upload.phpdiscuz_upload{}文件上传类source/class/cl
今天才发现这个函数的作用,原来可以查找特定的字符或者字符串。InStr()是asp里面的一个内置函数,主要用于检测1个字符串在另外1个字符串中首次出现的位置,I
在Javascript中不存在class的概念,它的class概念是通过构造函数(constructor)与原型链(prototype)来实现。1.构造函数(c
文件名:Awa_temp.Class.asp复制代码代码如下:用法示例:index.asp复制代码代码如下:模版temp.tpl:复制代码代码如下:无标题文档{
asp字符串截取函数'*********************************************************'函数:cutStr[s