ASP 循環(huán)導(dǎo)入導(dǎo)出數(shù)據(jù)處理 不使用緩存
更新時(shí)間:2009年01月13日 23:31:05 作者:
非常不錯(cuò),大家可以自己應(yīng)用下。
<%
'//數(shù)據(jù)處理部分
dim Content,Num,I,strCodea
I=request("I")
If len(I)=0 then I=0
Response.write "<br><div align=center>該程序目前已經(jīng)循環(huán)處理了"&I&"次數(shù)據(jù)</div><br>"
strCodea="UploadFiles/News" '//需要查詢是否包含的字符串
strCodeb="""""/UploadFiles/News" '//被替換的字符串
strCodec="""""http://chabaoo.cn/uploadfiles/news" '//替換字符串
Set rs = server.CreateObject("adodb.recordset")
rs.open "select content From news where id="&I&" and siteid=1 order by id desc",conn,1,1
If not(rs.eof or rs.bof) then
Content=rs("content")
Num=instr(content,strCodea)
If Num>0 then
If right(left(content,Num),2)="""""/" then
content=replace(content,strCodeb,strCodec)
end if
end if
end if
Rs.close
II=I+1
response.write("<meta http-equiv=""refresh"" content=""0;url=?I="&I""">")
Set rs = Nothing
%>
'//數(shù)據(jù)處理部分
dim Content,Num,I,strCodea
I=request("I")
If len(I)=0 then I=0
Response.write "<br><div align=center>該程序目前已經(jīng)循環(huán)處理了"&I&"次數(shù)據(jù)</div><br>"
strCodea="UploadFiles/News" '//需要查詢是否包含的字符串
strCodeb="""""/UploadFiles/News" '//被替換的字符串
strCodec="""""http://chabaoo.cn/uploadfiles/news" '//替換字符串
Set rs = server.CreateObject("adodb.recordset")
rs.open "select content From news where id="&I&" and siteid=1 order by id desc",conn,1,1
If not(rs.eof or rs.bof) then
Content=rs("content")
Num=instr(content,strCodea)
If Num>0 then
If right(left(content,Num),2)="""""/" then
content=replace(content,strCodeb,strCodec)
end if
end if
end if
Rs.close
II=I+1
response.write("<meta http-equiv=""refresh"" content=""0;url=?I="&I""">")
Set rs = Nothing
%>
相關(guān)文章
Asp 使用 Microsoft.XMLHTTP 抓取網(wǎng)頁(yè)內(nèi)容并過(guò)濾需要的
這篇文章主要介紹了Asp 使用 Microsoft.XMLHTTP 抓取網(wǎng)頁(yè)內(nèi)容(沒(méi)用亂碼),并過(guò)濾需要的內(nèi)容2014-05-05asp ajax注冊(cè)驗(yàn)證之 防止用戶名輸入空格
注冊(cè)驗(yàn)證之防止用戶名輸入空格,asp批量替換特殊字符函數(shù)代碼2009-08-08ASP中實(shí)現(xiàn)分頁(yè)顯示的七種方法
這篇文章主要介紹了ASP中實(shí)現(xiàn)分頁(yè)顯示的七種方法,這七種方法可以分為四大類,需要的朋友可以參考下2015-09-09asp實(shí)現(xiàn)禁止搜索引擎蜘蛛訪問(wèn)的代碼
這篇文章主要介紹了asp實(shí)現(xiàn)禁止搜索引擎蜘蛛訪問(wèn)的代碼,十分的簡(jiǎn)單實(shí)用,有需要的小伙伴可以參考下。2015-05-05