援用:
OnErrorResumeNext
援用:
<%
Setfso=Server.CreateObject("Scripting.FileSystemObject")
if(fso.FolderExists(Server.MapPath(folder)))then
判别假如存在就不做处置
else
判别假如不存在则创建新文件夹
fso.CreateFolder(Server.MapPath(folder))
endif
%>
援用:
<%
functionmakefilename(fname)
fname=fname前fname为变量,后fname为函数参数援用
fname=replace(fname,"-","")
fname=replace(fname,"","")
fname=replace(fname,":","")
fname=replace(fname,"PM","")
fname=replace(fname,"AM","")
fname=replace(fname,"上午","")
fname=replace(fname,"下战书","")
makefilename=fname&".html"
endfunction
%>
援用函数则:
<%fname=makefilename(now())%>
援用:
<html>
<head>
<metahttp-equiv="Content-Type"content="text/html;charset=hz">
<title>Cnbruce.Com|ASP2HTMLTEST</title>
</head>
<bodyleftmargin="0"topmargin="0">
<tablewidth="100%"height="100%"border="0"cellpadding="5"cellspacing="2">
<tralign="right"bgcolor="#CCCCCC">
<tdheight="20"colspan="2">$cntop{LogContent}lt;/td>
</tr>
<trvalign="top">
<tdwidth="25%"bgcolor="#e5e5e5">$cnleft{LogContent}lt;/td>
<tdwidth="74%"bgcolor="#f3f3f3">$cnright{LogContent}lt;/td>
</tr>
</table>
</body>
</html>
援用:
<%
天生文件名的函数
functionmakefilename(fname)
fname=fname
fname=replace(fname,"-","")
fname=replace(fname,"","")
fname=replace(fname,":","")
fname=replace(fname,"PM","")
fname=replace(fname,"AM","")
fname=replace(fname,"上午","")
fname=replace(fname,"下战书","")
makefilename=fname&".shtml"
endfunction
坚持数据格局稳定的函数
functionHTMLEncode(fString)
fString=replace(fString,">",">")
fString=replace(fString,"<","<")
fString=Replace(fString,CHR(32),"")
fString=Replace(fString,CHR(13),"")
fString=Replace(fString,CHR(10)&CHR(10),"<br>")
fString=Replace(fString,CHR(10),"<br>")
HTMLEncode=fString
endfunction
%>
欢迎光临 仓酷云 (http://ckuyun.com/) | Powered by Discuz! X3.2 |