JavaScrip Zone


新发表

新评论

留言信息

链接收藏

『中国群落博客』

免费注册博客通道

快速登陆


动态include

<%
'动态包含文件
Function include(filename)
Dim re,content,fso,f,aspStart,aspEnd

set fso=CreateObject("Scripting.FileSystemObject")
set f=fso.OpenTextFile(server.mappath(filename))
content=f.ReadAll
f.close
set f=nothing
set fso=nothing

set re=new RegExp
re.pattern="^\s*="
aspEnd=1
aspStart=inStr(aspEnd,content,"<%")+2
do while aspStart>aspEnd+1
Response.write Mid(content,aspEnd,aspStart-aspEnd-2)
aspEnd=inStr(aspStart,content,"%\>")+2
Execute(re.replace(Mid(content,aspStart,aspEnd-aspStart-2),"Response.Write "))
aspStart=inStr(aspEnd,content,"<%")+2
loop
Response.write Mid(content,aspEnd)
set re=nothing
End Function
%>

                                                                 2006-7-18 15:04:26

Posted by jser | 阅读全文() | 回复(0) | 引用通告() | 编辑

..................................................
博客的精神于写自己某一刻的思想或心动!
..................................................
当然要是你愿意就是拿来做记事本也可以!
..................................................
群落博客将提供全程免费服务!免费注册!
..................................................
欢迎您成为群落博客的成员!使用之前请先看系统帮助>>>>系统帮助
..................................................

免费注册群落博客【点击完成注册】
..................................................

发表评论:

    昵称:
    密码: (游客无须输入密码)
    主页:
    标题: