久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長(zhǎng)資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      asp刪除sql數(shù)據(jù)庫(kù)中沒有記錄的圖片

      asp刪除沒有記錄的圖片需要文件夾(存放圖片的文件夾)中的每個(gè)圖片和數(shù)據(jù)庫(kù)中的所有記錄進(jìn)行比較,采用雙重循環(huán)。把圖片進(jìn)行“.”分割后名字問前面部分,那其余數(shù)據(jù)庫(kù)中的 圖片路徑記錄進(jìn)行對(duì)比,采用vb的InStr函數(shù) 如果存在的話返回值>0,過可以得出結(jié)論

      代碼如下deal.asp

      <%@ language=”vbscript”%>  
      <%response.Expires = 0%>  
      <!–#include file=”conn.asp”–>  
      <%  
      Dim objFSO,objFolder,objFile,FF ‘聲明 objFSO 變量存放對(duì)象實(shí)例   
      FF = Server.MapPath(“pro_s/”)   
      Set objFSO = Server.CreateObject(“Scripting.FileSystemObject”)   
      If objFSO.FolderExists(ff) Then   
      Response.write “文件夾 “&ff&” 里所有的文件:<br>”   
      Set objFolder = objFSO.GetFolder(ff)   
       
      For Each objFile in objFolder.Files   
      %>  
          <%  
              filename=cstr(objFile.name)   
              myname=split(filename,”.”)  
              ffname=myname(0)  
              a=0  
              set sclass=conn.execute(“select  img from wksc_pro “)  
              do while not sclass.eof  
            
              result=Instr(sclass(“img”),ffname)  
              a=a+result  
              if(a>0) then   
                  exit do  
              end if   
       
              sclass.movenext  
              loop  
              if(a=0) then  
              response.Write “”&objFile&”” 
              response.Write”<br>” 
              objFile.delete  
                
              end if   
          %>  
      <%  
      Next   
      Else   
      Response.Write “文件夾”&ff&”不存在,無(wú)法讀取相關(guān)信息!”   
      End If   
      Set objFolder = Nothing   
      Set objFSO = Nothing ‘釋放 FileSystemObject 對(duì)象實(shí)例內(nèi)存空間  
      %> 

       

      分享到: 更多

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)