ASP常用的系统配置函数
程序员文章站
2024-01-22 11:55:16
sub saveconfig() dim fso,hf set fso=server.createobject("sc...
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
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