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

时间: 2024-09-20 22:32:52

ASP常用的系统配置函数_应用技巧的相关文章

[整理版]ASP常用内置函数_应用技巧

函数,就是该语言封装了的一个功能块,以方便用户的调用.比如"now()"在VBScript中就是一个能显示出当前日期和时间的函数.至于具体为什么能显示,则是该语言内核所定的,用户只需明白"now()"就是用来能显示日期时间的.那么,我们当前接触的VBScript还有其他什么功能的函数么? 1,日期/时间函数这些函数包括对"年"."月"."日"."时"."分".&quo

收集整理的ASP的常用内置函数_应用技巧

函数,就是该语言封装了的一个功能块,以方便用户的调用.比如"now()"在VBScript中就是一个能显示出当前日期和时间的函数.至于具体为什么能显示,则是该语言内核所定的,用户只需明白"now()"就是用来能显示日期时间的.那么,我们当前接触的VBScript还有其他什么功能的函数么? 1,日期/时间函数 这些函数包括对"年"."月"."日"."时"."分".&qu

asp最常用的分页函数_应用技巧

复制代码 代码如下:     rs.open sql,conn,1,1     if rs.eof and rs.bof then      response.write "<p align='center'>还没找到文章</p>"   else    totalPut=rs.recordcount    maxperpage=18    if currentpage<1 then     currentpage=1     end if    if (c

discuz 2.0整合asp系统,用户添加函数_应用技巧

函数可以参考: 复制代码 代码如下: <% '注册论坛用户,参数说明 'username 用户登录名称 'password 用户有登录密码 'groupid 用户组id,高级会员,用户组id为17:正式会员,用户组id为18;普通会员,则用户组id为10 'email,realname,mobile,phone 电子邮件,真实姓名,手机,电话 sub regbbsuser(username,password,groupid,email,realname,mobile,phone) '数据库连接

asp身份证验证代码函数_应用技巧

身份证验证代码函数 Function CheckCardId(e) arrVerifyCode = Split("1,0,x,9,8,7,6,5,4,3,2", ",") Wi = Split("7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2", ",") Checker = Split("1,9,8,7,6,5,4,3,2,1,1", ",") If Len(e

浅析ASP.NET生成随机密码函数_实用技巧

实现ASP.NET生成随机密码功能是很容易的,下面的代码给出了完整的实现方法: 复制代码 代码如下: publicstaticstringMakePassword(stringpwdchars,intpwdlen) { stringtmpstr=""; intiRandNum; Randomrnd=newRandom(); for(inti=0; i{ iRandNum=rnd.Next(pwdchars.Length); tmpstr+=pwdchars[iRandNum]; } r

asp:生成静态页面函数_应用技巧

复制代码 代码如下: <% if SaveFile("/htm/list.htm","http://www.xxx.com/asp/list.asp") then Response.write "已生成" else Response.write "没有生成" end if function SaveFile(LocalFileName,RemoteFileUrl) Dim Ads, Retrieval, GetRemot

asp 过滤非法字符函数_应用技巧

<% Function cutbadchar(str) badstr="不|文|明|字|符|列|表|格|式" badword=split(badstr,"|") For i=0 to Ubound(badword) If instr(str,badword(i)) > 0 then str=Replace(str,badword(i),"***") End If Next cutbadchar=str End Function Res

ASP 非法字符过滤函数_应用技巧

复制代码 代码如下: <% '==============================================================检查提交数据合法性 Function CheckInput()  '--------定义部份------------------  Dim Fy_Post,Fy_Get,Fy_In,Fy_Inf,Fy_Xh,Fy_db,Fy_dbstr,Kill_IP,WriteSql  '自定义需要过滤的字串,用 "|" 分隔  Fy_In