当前位置:首页 > ASP教程 > ASP基础

ASP常用的系统配置函数

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

【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!

相关教程推荐

其他课程推荐