首页 > 开发 > Asp > 正文

ASP常用的系统配置函数

2020-06-20 13:11:16
字体:
来源:转载
供稿:网友
sub SaveConfig()
 dim fso,hf
 set fso=Server.CreateObject("Scripting.FileSystemObject")
 set hf=fso.CreateTextFile(Server.mappath("../inc/config.asp"),true)
 hf.write "<" & "%" & vbcrlf
 hf.write "Const SiteName=" & chr(34) & trim(request("SiteName")) & chr(34) & "        '网站名称" & vbcrlf
 hf.write "Const SiteTitle=" & chr(34) & trim(request("SiteTitle")) & chr(34) & "        '网站标题" & vbcrlf
 hf.write "Const SiteUrl=" & chr(34) & trim(request("SiteUrl")) & chr(34) & "        '网站地址" & vbcrlf
 hf.write "%" & ">"
 hf.close
 set hf=nothing
 set fso=nothing 
end sub
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表