-
Asp生成xml乱码解放方法
所属栏目:[Asp] 日期:2020-05-29 热度:218
!--#include file=../inc/conn.asp--%Call opendata(1)Set rs=server.CreateObject(adodb.recordset)xmlfile=server.mappath(content.xml)Set fso = CreateObject(Scripting.FileSystemObject)Set MyFile = fso.CreateTextFile(xmlfile,True,-1)MyFile.WriteL[详细]
-
Server.MapPath(path)的使用
所属栏目:[Asp] 日期:2020-05-27 热度:171
用法:1.Server.MapPath(/) 应用程序根目录所在的位置 如 C:Inetpubwwwroot2.Server.MapPath(./) 表示所在页面的当前目录 注:等价于Server.MapPath() 返回 Server.MapPath()所在页面的物理文件路径3.Server.MapPath(../)表示上一级目录4.Server.MapPath(~/)[详细]
-
vbscript正则表达式测试方法
所属栏目:[Asp] 日期:2020-05-27 热度:192
%For Each r In Request.QueryStringIf RegExpTest([%s;]+,Request.QueryString) thenResponse.Write(script language=javascriptalert(信息有误!);/script)Response.End()end IfNextvbscript正则表达式测试方法function RegExpTest(patrn, strng)Dim regEx[详细]
-
ASP生成静态页面
所属栏目:[Asp] 日期:2020-05-22 热度:104
meta http-equiv=Content-Type content=text/html; charset=gb2312%FilePath = Server.MapPath(/)/index.htmresponse.Write(FilePath)Do_Url = http://Do_Url = Do_UrlRequest.ServerVariables(SERVER_NAME)/default.aspxstrUrl = Do_Urlresponse.Write(strUr[详细]
-
ASP生成文件
所属栏目:[Asp] 日期:2020-05-22 热度:209
Set fso = Server.CreateObject(Scripting.FileSystemObject) Set fout = fso.Createtextfile(server.mappath(..eshopviewrs(bname)),true)fout.writeline okfilefout.closeFiLePaTh = Server.MapPath(....commerceview)tempfnameSet fso = CreateObject(Scri[详细]
-
asp数组使用
所属栏目:[Asp] 日期:2020-05-22 热度:91
在ASP编程中使用数组数组的定义DimMyArrayMyArray=Array(1,5,123,12,98)可扩展数组DimMyArray()fori=0to10ReDimPreserveMyArray(i)MyArray(i)=inext将一个字符串分割并返回分割结果的数组DimMyArrayMyArray=Split(tempcnt,chr(13)chr(10))ForI=Lbound(MyArray[详细]
-
IIS出现server application error的解决办法
所属栏目:[Asp] 日期:2020-05-22 热度:157
Server Application ErrorThe server has encountered an error while loading2009-10-31 14:48The server has encountered an error while loading an application during the processing of your request. Please refer to the event log for more detail i[详细]
-
ASP导入Excel数据到SQL
所属栏目:[Asp] 日期:2020-05-22 热度:102
form action=insert.asp method=post enctype=multipart/form-data name=form1 onSubmit=b1_onclick() table width=500 border=1 align=center cellpadding=0 cellspacing=0 tr td colspan=2 bgcolor=#999999 class=t选择文件/td /tr tr td colspan=2 class=t[详细]
-
ASP计算当月天数
所属栏目:[Asp] 日期:2020-05-22 热度:95
dd = Date() 今天dd = dateadd(m,1,dd) 月份加1dd = Cdate(Year(dd) - Month(dd) -1) 下月的第一天dd=dateadd(d,dd,-1) 本月的最后一天dd=day(dd) 本月的天数Response.Write(dd)[详细]
-
随机产生N位由数字和字母组成的密码 asp随机数
所属栏目:[Asp] 日期:2020-05-22 热度:141
随机产生N位由数字和字母组成的密码 asp随机数%RandomizeDo While Len(pass)12 ’随机密码位数num1=CStr(Chr((57-48)*rnd+48)) ’0~9num2=CStr(Chr((90-65)*rnd+65)) ’A~Znum3=CStr(Chr((122-97)*rnd+97)) ’a~zpass=passnum1num2num3loop%%=pass%1、小于号[详细]
-
超长文章分页并生成静态页实例
所属栏目:[Asp] 日期:2020-05-22 热度:102
set rsn=server.CreateObject(adodb.recordset)sqln=select top 1 * from vArticle where apage=abnamersn.open sqln,conn,1,1if not rsn.eof thendo while not rsn.eofpage_n=len(rsn(aContent))-len(replace(rsn(aContent),[NextPage],))page_n=split(rsn(a[详细]
-
详谈asp生成静态页方法
所属栏目:[Asp] 日期:2020-05-22 热度:189
生成静态页的好处不用说,当今大型网站,为缓解服务器端的压力许的的页面都改用了静态的页面,并利用AJAX技术动态地更新其中的部分内容,如广告等。一个简单的不用模板可以直接生成HTML静态页的方法.如一个正常的index.asp动态页面,新建一个文件makeasp2html[详细]
-
使用ASPJPEG添加水印的方法
所属栏目:[Asp] 日期:2020-05-22 热度:176
下载AspJpeg v1.5.0.0,然后执行下载得到的文件,安装该组件。然后在ASP代码里增加一点点代码即可,增加的位置可以放在上传图片完成后,取得图片地址,进行修改。对于Z-Blog的使用者,直接将下面代码复制到c_system_lib.asp文件的TUpLoadFile类中的Upload函数[详细]
-
ASP函数大全
所属栏目:[Asp] 日期:2020-05-22 热度:98
Array()CInt()CStr()Date()DateAdd()Day()FormatCurrency()FormatDateTime()FormatNumber()FormatPercent()Instr()InstrRev()Int()IsArray()IsDate()IsNull()IsNumeric()IsObject()LBound()LCase()Len()LTrim()Mid()Minute()Month()Now()Right()Rnd()Round()R[详细]
-
ASP新闻栏目切换+JS
所属栏目:[Asp] 日期:2020-05-22 热度:116
%dim rsdim sqldim countset rs=server.createobject(adodb.recordset)sql = select * from kml_sclassrs.open sql,conn,1,1%script language = JavaScriptvar onecount;onecount=0;subcat = new Array(); % count = 0 do while not rs.eof %subcat[%=count%][详细]
-
ASP替换字符
所属栏目:[Asp] 日期:2020-05-22 热度:109
%用户输入非法字符dim checkstring(3)checkstring(0) = checkstring(1) = checkstring(2) = ;checkstring(3) = :替换用户输入的非法字符 stringarray 非法字符数组 checkstring 需检查的字符串function ReplaceString(stringarray,checkstring)for i=0 to ubo[详细]
-
存储过程介绍和它在asp中的使用
所属栏目:[Asp] 日期:2020-05-22 热度:84
一、先介绍一下什么是存储过程存储过程是利用SQL Server所提供的Tranact-SQL语言所编写的程序。Tranact-SQL语言是SQL Server提供专为设计数据库应用程序的语言,它是应用程序和SQL Server数据库间的主要程序式设计界面。它好比Oracle数据库系统中的Pro-SQL和I[详细]
-
ASP禁止网页缓存,验证码生成,删除文件 iFileName 文件名 iPath 文件路径
所属栏目:[Asp] 日期:2020-05-22 热度:201
%禁止网页缓存Response.Buffer = TrueResponse.ExpiresAbsolute = Now() - 1Response.Expires = 0Response.CacheControl = no-cache验证码生成dim yz2randomize timeryz2=Int((8999)*Rnd +1009)session(ok)=yz2%删除文件 iFileName 文件名 iPath 文件路径%有[详细]