非常不錯,大家可以自己應用。 <%
'//資料處理部分
dim Content,Num,I,strCodea
I=request(I)
If len(I)=0 then I=0
Response.write <br><div align=center>該程式目前已經循環處理了&I&次資料</div><br>
strCodea=UploadFiles/News '//需要查詢是否包含的字串
strCodeb=/UploadFiles/News '//被替換的字串
strCodec=http://www.vevb.com/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
%>