asp如何使用adodb.stream读写2进制数据,示例源代码如下'使用adodb.stream将文件读取为二进制数据数组Function ReadBinary(FileName) Dim Buf(), I With CreateObject(ADODB.Stream) .Mode = 3: .Type = 1: .Open: .LoadFromFile FileName ReDim Buf(.Size - 1) For I = 0 To .Size - 1: Buf(I) = AscB(.Read(1)): Next ...
asp生成0~9,a~z的36进制字符串,运行下面示例需要使用IE核心的浏览器,其他非IE核心浏览器不支持vbscriptscript language=vbscriptfunction getinitstring(l)'初始化指定长度的0字符串 l=l-1 for i=0 to l getinitstring=0getinitstring nextend functionfunction getnextchar(chrcode)'获取下一个字符 if chrcode=57 then&..
set fso=createobject(Scripting.FileSystemObject) set fn=fso.GetFile(E:\AD.txt) msgbox 文件创建时间:fn.DateCreated msgbox 文件最后修改时间:fn.DateLastModified msgbox 文件最后访问时间:fn.DateLastAccessed set fn=nothing set fso=nothing
asp时间戳和时间对象相互转换源代码'把标准时间转换为UNIX时间戳Function ToUnixTime(strTime, intTimeZone) If IsEmpty(strTime) or Not IsDate(strTime) Then strTime = Now If IsEmpty(intTimeZone) or Not isNumeric(intTimeZone) Then intTimeZone = 0 ToUnixTime = DateAdd(h,-intTimeZone,strTime) ToUnixTime = Dat..
asp读出文件放入表单的textarea容器中,修改后写回原文件中。注意如果文件编码不是系统默认的ansi,调用opentextfile方法时加上编码。参考Scripting.FileSystemObject的OpenTextFile方法参数说明asp检测文件编码asp读写文件示例源代码%set fso=server.CreateObject(scripting.filesystemobject) if request.querystring(action)=update then..
asp使用CDO.Message组件发邮件示例-远程Server需要身份验证 Const cdoSendUsingPickup = 1 'Send message using the local SMTP service pickup directory. Const cdoSendUsingPort = 2 'Send the message using the network (SMTP over the network). Const cdoAnonymous = 0 'Do not authenticate Const cdoBa..
将asp函数的参数通过chrw编码加密后,如后解码chrw内容。下面的解码函数,原来很简单,用正则提取内容中的chrw串,然后eval动态执行获取的chrw串得到内容,再执行替换即可。注意事项参考源代码里面的注释,注意将源代码保存为vbs格式的文件后执行,如果是asp文件,需要将createobject修改为server.createobject asp chrw编码解密文件源代..
s=test1,test2fasdfasfafsa%response.write aaa%dfafadfafafafa%for i=0 to 1:response.write ddd:next%fdsfdfdsfsd_ dddddd22222aaaaaa%aaa=888%换行set rx=new RegExp'创建正则表达式rx.Global=true'全局匹配rx.Pattern=%([\s\S]+?)%'正则表达式set mc=rx.Execute(s)'执行匹配response.write 共有mc.count项for each m in mc..