asp常用代码大全
er.mappath(filename)) then exit function
set f = fso.opentextfile(server.mappath(filename),1)
if not f.AtEndofStream then
tempcnt = f.readall
f.close
temparray = split(tempcnt,chr(13)&chr(10))
if lineNum>ubound(temparray)+1 then
exit function
else
temparray(lineNum-1) = lineContent
end if
tempcnt = join(temparray,chr(13)&chr(10))
set f = fso.createtextfile(server.mappath(filename),true)
f.write tempcnt
end if
f.close
set f = nothing
end function
20.使用FSO添加文件新行的函数
function FSOappline(filename,Linecontent)
dim fso,f
set fso = server.CreateObject("scripting.filesystemobject")
if not fso.fileExists(server.mappath(filename)) then exit function
set f = fso.opentextfile(server.mappath(filename),8,1)
f.write chr(13)&chr(10)&Linecontent
f.close
set f = nothing
end function
21.读文件最后一行的函数
function FSOlastline(filename)
dim fso,f,temparray,tempcnt
set fso = server.CreateObject("scripting.filesystemobject")
if not fso.fileExists(server.mappath(filename)) then exit function
set f = fso.opentextfile(server.mappath(filename),1)
if not f.AtEndofStream then
tempcnt = f.readall
f.close
set f = nothing
temparray = split(tempcnt,chr(13)&chr(10))
FSOlastline = temparray(ubound(temparray))
end if
end function
利用FSO取得BMP,JPG,PNG,GIF文件信息(大小,宽、高等)
<%
'::: BMP, GIF, JPG and PNG :::
'::: This function gets a specified number of bytes from any :::
'::: file, starting at the offset (base 1) :::
'::: :::
'::: Passed: :::
'::: flnm => Filespec of file to read :::
'::: offset => Offset at which to start reading :::
'::: bytes => How many bytes to read :::
'::: :::
':::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
function GetBytes(flnm, offset, bytes)
Dim objFSO
Dim objFTemp
Dim objTextStream
Dim lngSize
on error resume next
Set objFSO = CreateObject("Scripting.FileSystemObject")
' First, we get the filesize
Set objFTemp = objFSO.GetFile(flnm)
lngSize = objFTemp.Size
set objFTemp = nothing
fsoForReading = 1
Set objTextStream = objFSO.OpenTextFile(flnm, fsoForReading)
if offset > 0 then
strBuff = objTextStream.Read(offset - 1)
end if
if bytes = -1 then ' Get All!
GetBytes = objTextStream.Read(lngSize) 'ReadAll
else
GetBytes = objTextStream.Read(bytes)
end if
objTextStream.Close
set objTextStream = nothing
set objFSO = nothing
end function
':::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
'::: :::
'::: Functions to convert two bytes to a numeric value (long) :::
'::: (both little-endian and big-endian) :::
'::: :::
':::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
function lngConvert(strTemp)
lngConvert = clng(asc(left(strTemp, 1)) + ((asc(right(strTemp, 1)) * 256)))
end function
function lngConvert2(strTemp)
lngConvert2 = clng(asc(right(strTemp, 1)) + ((asc(left(strTemp, 1)) * 256)))
end function
':::::::::::::::::::::::::
[/WITCODE] 常用ASP特效代码-网页制作代码小技巧-12008-10-18 12:181.设置滚动条颜色 scrollbar-3d-light-color 立体滚动条亮边的颜色(设置滚动条的颜色) ...
常用代码集锦ASP_IT/计算机_专业资料。常用代码集锦ASP ●显示页面加载时间 ...门派:无门无派 注册:2005 年 6 月 2 日 楼主 整站系统源码下载大集合!!!...
ASP代码大全_计算机软件及应用_IT/计算机_专业资料。邮件方面: CDONTS: <% ...在此把一些实用性很强的代码奉献出来,与大家共同分享 ... 1.生成日历 脚本...
asp一般代码大全_IT/计算机_专业资料 暂无评价0人阅读0次下载举报文档 asp一般代码大全_IT/计算机_专业资料。asp asp常用代码 asp代码大全...
经典ASP代码大集合_IT/计算机_专业资料。经典ASP代码大集合经典ASP 代码大集合...(this.form.list)"> 选中所有显示记录 转贴经典实用的代码: 1、关闭窗口在...
8页 免费 ASP建站十大常用程序代码完... 38页 免费 一些常用的ASP代码 10页 免费 asp常用代码集锦 17页 1财富值 asp常用代码 18页 免费...
38页 免费 ASP代码大全 52页 1财富值 ASP实用大全-ASP基础 47页 免费 asp注册登陆系统源代码 8页 免费 5分钟编写一个ASP论坛 11页 免费...
38页 免费 ASP代码大全 52页 1财富值 asp实用基础教材 54页 免费 ASP+IIS配置 11页 1财富值 ASP基础教程之实例学习ASP 13页 免费...
ASP建站十大常用程序代码完... 38页 免费 ASP代码大全 52页 1财富值 asp注册登陆系统源代码 8页 免费 ASP添加、删除、修改代码 ... 2页 免费 5分钟编写一...
热门文档