忠网广告 系统 用到的几个函数(2)
NewTest=replace(NewTest,chr(9)," ")'table
NewTest=replace(NewTest,chr(10),"<br>") '回车
NewTest=replace(NewTest,chr(13),"<br>")
PubCodehtml=NewTest
end function
'//********************************************************************
' PubCtime() 组合系统时间为正常字符串 含 年、月、日、时、分、秒 如:200412172356
'********************************************************************//
Function PubCtime()
Dim GcChars
GcChars = now()
GcChars = replace(GcChars,"-","")
GcChars = replace(GcChars," ","")
GcChars = replace(GcChars,":","")
GcChars = replace(GcChars,"PM","")
GcChars = replace(GcChars,"AM","")
GcChars = replace(GcChars,"上午","")
GcChars = replace(GcChars,"下午","")
GcChars = int(GcChars) + int((10-1+1)*Rnd + 1)
PubCtime=GcChars
end function
'//********************************************************************
' PubFolderIfcz(Foldername) 判断目录是否存在,需要 fso支持 参数:Foldername
'********************************************************************//
Function PubFolderIfcz(Foldername)
Dim fso
FolderIfcz=false
if Foldername<>"" then
Foldername=Server.MapPath(Foldername)
Set fso = server.CreateObject("Scripting.FileSystemObject")
if fso.FolderExists(Foldername) then
FolderIfcz=true
end if
set fso = nothing
end if
end Function
'//********************************************************************
' PubFileIfcz(Filename) 判断文件是否存在,需要 fso支持 参数:Filename
'********************************************************************//
Function PubFileIfcz(Filename)
Dim fso
PubFileIfcz=false
if Filename<>"" then
Filename=Server.MapPath(Filename)
Set fso = server.CreateObject("Scripting.FileSystemObject")
if fso.FileExist(Filename) then
PubFileIfcz=true
end if
set fso = nothing
end if
end Function
'//********************************************************************
' PubDeleteFile(Filename) 删除文件,需要 fso支持 参数:Filename 预删除文件的相对路径
内容版权声明:除非注明,否则皆为本站原创文章。