推薦:如何用asp程序處理數據庫被掛馬的問題數據庫被掛馬後很多人不知怎麼處理,或處理的不完全,導致網頁打開後仍有木馬,本文介紹一種比較好的處理辦法,供大家參考。 第一步:為現有數據庫做好備份。 第二步:執行如下ASP文件,就可以去掉數據庫當中的JS木馬。 (注:conn.asp從略) '這裡放入JS木
這是一個正常的網頁文件| html> <head> <metahttp-equiv=Content-Typecontent=text/html;charset=gb2312/> <title>新聞圖片輪換</title> </head> <body> <!--#Includefile=diaoyong.asp--> </body> </html> |
任何網頁只要調用下面這個文件(diaoyong.asp)就可以了,所用flash文件在附件裡面。
| <% '新聞圖片輪換 Db=../Data/Data.Asp Setconn=Server.CreateObject(ADODB.Connection) Connstr=Provider=Microsoft.Jet.OLEDB.4.0;DataSource=&Server.MapPath(db) Conn.OpenConnstr sql=selecttop5*from[Music_List_Tupian_System]whereIswNumsSex= '輪換圖片'orderbyIswNumsIDdesc setrs=server.createobject(adodb.recordset) rs.opensql,conn,1,1 ifnotrs.eofthen k=1 Num_total=rs.recordcount fori=1to5 ifi>Num_totalthenexitfor ifi=1then imgUrl11=Img/&rs(IswNumsPhoto) iflen(rs(IswNumsUser))>=18then imgtext11=left(rs(IswNumsUser),18)&... else imgtext11=rs(IswNumsUser) endif imgLink11=rs(IswNumsClass) endif ifi=2then imgUrl22=Img/&rs(IswNumsPhoto) iflen(rs(IswNumsUser))>=18then imgtext22=left(rs(IswNumsUser),18)&... else imgtext22=rs(IswNumsUser) endif imgLink22=rs(IswNumsClass) endif ifi=3then imgUrl33=Img/&rs(IswNumsPhoto) iflen(rs(IswNumsUser))>=18then imgtext33=left(rs(IswNumsUser),18)&... else imgtext33=rs(IswNumsUser) endif imgLink33=rs(IswNumsClass) endif ifi=4then imgUrl44=Img/&rs(IswNumsPhoto) iflen(rs(IswNumsUser))>=18then imgtext44=left(rs(IswNumsUser),18)&... else imgtext44=rs(IswNumsUser) endif imgLink44=rs(IswNumsClass) endif ifi=5then imgUrl55=Img/&rs(IswNumsPhoto) iflen(rs(IswNumsUser))>=18then imgtext55=left(rs(IswNumsUser),18)&... else imgtext55=rs(IswNumsUser) endif imgLink55=rs(IswNumsClass) endif rs.movenext k=k+1 next else response.write暫時沒有數據! endif %> |
分享:詳解asp之FileSystemObject對象指定的驅動器存在嗎? 本例演示如何使用DriveExists方法來探測某個驅動器是否存在。 代碼如下: html body % Setfs=Server.CreateObject(Scripting.FileSystemObject) iffs.driveexists(c:)=truethen Response.Write(驅動器c:存在。) Else Response.Wr
共2頁上一頁12下一頁