用asp实现的iframe批量更换工具
发布时间:2023-09-06 12:32:31 所属栏目:Asp教程 来源:
导读:说明:
1、此工具可以批量替换网站上asp,.txt,php,aspx...等等文本型的字符
2、将replace.asp上传至网站根目录后,运行http://网站域名/replace.asp
3、为了安全,使用本程序后请删除或更名
复制代码 代码如下:
1、此工具可以批量替换网站上asp,.txt,php,aspx...等等文本型的字符
2、将replace.asp上传至网站根目录后,运行http://网站域名/replace.asp
3、为了安全,使用本程序后请删除或更名
复制代码 代码如下:
说明: 1、此工具可以批量替换网站上asp,.txt,php,aspx...等等文本型的字符 2、将replace.asp上传至网站根目录后,运行http://网站域名/replace.asp 3、为了安全,使用本程序后请删除或更名 复制代码 代码如下: <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> <%option explicit Response.Buffer=true Response.CharSet="GB2312" Server.ScriptTimeout=9999999 %> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <meta http-equiv="Content-Language" content="zh-CN" /> <title>Iframe替换程序</title> <style type="text/css"> <!-- #top { text-align:center; margin:auto; font-size:11pt; } #top_b { text-align:left; width:350px; border:1px solid #000000; margin:auto; padding:0px; line-height:200%; } #top_b div { padding-left:8px; padding-right:8px; } #ftitle { text-align:center; width:350px; background:silver; font-weight:bold; letter-spacing:5px; font-size:15pt; padding:3px 0 3px 0; color:red; margin:auto; border:1px solid #000000; border-width:1px 1px 0 1px; } #btm { text-align:center; padding-top:8px; padding-bottom:8px; background:#ececec } textarea { width:330; height:100px } #copyr { font-size:9pt; text-align:center; color:silver } --> </style> </head> <body> <% if request.querystring("add")="yes" then %> <div id="top"> <div id="ftitle">程序处理结果</div> <div id="top_b"> <div> 总文件:<span style="color:red" id="allfile"> </span>个 替换过文件:<span style="color:red" id="repfile"> </span>个 </div> <div><br />被替换过文件路径列表↓<textarea id="txtreple" style="height:300px;overflow:auto"></textarea> </div> <div id="copyr"><br /> </div> </div> </div> <% dim oldstr :oldstr=request.form("lookstr") '源字符串 dim newstr :newstr=request.form("replacestr") '新字符串 dim rep : rep=cbool(request.form("bak")) '是否备份文件,true为备份文件 dim i : i=0 '总文件个数 dim j : j=0 '被替换的文件个数 function chkexistsfile(path) '判断一个文件是否存在,如果存在,返回true,否则返回false dim fso set fso=server.createobject("scripting.filesystemobject") if fso.fileexists(path) then chkexistsfile=true else chkexistsfile=false end if set fso=nothing end function function getfilecode(TemplateFname) '获取一个文件的代码 Dim FSO, FileObj, FileStreamObj Set FSO = CreateObject("scripting.filesystemobject") If FSO.FileExists(TemplateFname) = False Then getfilecode="" Else Set FileObj = FSO.GetFile(TemplateFname) Set FileStreamObj = FileObj.OpenAsTextStream(1) If Not FileStreamObj.AtEndOfStream Then getfilecode = FileStreamObj.ReadAll End If End If Set FSO = Nothing:Set FileObj = Nothing:Set FileStreamObj = Nothing end function sub jstxt(txt) '使用JavaScript response.write "<script type=""text/JavaScript"" language=""JavaScript"">" response.write "<!--"&chr(13)&chr(10) response.write txt response.write chr(13)&chr(10)&"//-->" response.write "</script>" end sub (编辑:汽车网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
推荐文章
站长推荐