用fso配置文件
Set fs=CreateObject("Scripting.FileSystemObject")
Set TS1 = fs.OpenTextFile(Server.MapPath("config.asp"),2,True)
TS1.writeline "<"&chr(37)
TS1.writeline "webname="&chr(34)&""&request("webname")&""&chr(34)&""
TS1.writeline chr(37)&">"
Set TS1 = Nothing
Set fs=nothing
'排序函数
function shortAr(byref artemp)
dim t
for j = 0 to ubound(artemp)-1
for i = 0 to ubound(artemp)-(j+1)
if artemp(i) > artemp(i+1) then
t=artemp(i)
artemp(i) = artemp(i+1)
artemp(i+1) = t
end if
next
next
end function
博客展示了使用FSO进行配置文件操作的代码,通过CreateObject创建对象并写入配置信息。同时给出了一个排序函数,利用双重循环对数组元素进行比较和交换,实现排序功能。
1万+

被折叠的 条评论
为什么被折叠?



