Pagina 1 di 2 1 2 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 16
  1. #1

    "objFso.FileExists" NON FUNZIONA

    codice:
    strFile = "sofia@"&ShowSub&"@"& strPicArray(0,x)
    strFilePath = "/public/preview_thumb_sofia_tmp/"
    
    foto_da_cercare = strFilePath & strFile 
    
    Response.Write foto_da_cercare &"
    "
    
    Set objFso = Server.CreateObject("Scripting.FileSystemObject") 
    
    if objFso.FileExists(foto_da_cercare) then 
            Response.Write"[img]"&foto_da_cercare&"[/img]"
    else 
            Response.Write "[img]resizetool.aspx?mode=0&width=50&height=50&path=/sofia/"&ShowSub & "/" & ShowPic& "[/img]"
    
    end if 
    Set objFso = Nothing
    i path sono corretti.... ho fatto un paio di response.write e sono OK!!!
    ma allora perche anche se esiste la "foto_da_cercare" non fa quello che deve fare????
    ..: Serie A :..
    ..: FORZA PALERMOOOOoooo.....

  2. #2
    Utente di HTML.it L'avatar di wallrider
    Registrato dal
    Apr 2003
    Messaggi
    2,755
    una volta avevo lo stesso problema perchè quando costruivo il percorso del file c'era uno spazio di troppo
    prova
    codice:
    Response.Write "-" & foto_da_cercare &"-
    "
    RIP Cicciobenzina 9/11/2010

    "Riseminaciceli, i ceci nell'orto"

  3. #3
    devi usare Server.MapPath, per riportare il percorso virtuale a percorso fisico

  4. #4
    codice:
    strFile = "/public/tmp_photo/sofia@"&ShowSub&"@"& strPicArray(0,x) 
    
    strFilePath = Server.MapPath(strFile) 
    Set objFso = Server.CreateObject("Scripting.FileSystemObject") 
    
    'Response.Write strFilePath
    
    if objFso.FileExists(strFilePath) then 
    Response.Write("Il file esiste") 
    'Response.Write"[img]"&strFile&"[/img]"
    
    else 
    Response.Write("Il file NON esiste") 
    'Response.Write "[img]resizetool.aspx?mode=0&width=50&height=50&path=/sofia/"&ShowSub & "/" & ShowPic& "[/img]"
    end if 
    
    Set objFso = Nothing
    nulla di fatto..... se ne frega che gia esiste la foto e fa l'istruzione dell'else
    ..: Serie A :..
    ..: FORZA PALERMOOOOoooo.....

  5. #5
    codice:
    strFile = "sofia@" & ShowSub & "@" & strPicArray(0,x) 
    strPath = "/public/tmp_photo/"
    strFilePath = Server.MapPath(strPath) & strFile
    
    Response.Write "maGGico Path...: " & strFilePath
    Response.Flush
    
    Set objFso = Server.CreateObject("Scripting.FileSystemObject") 
    ... ecc ecc
    poi posta quello che viene a video

  6. #6
    maGGico Path...: D:\inetpub\webs\miositoit\public\tmp_photosofia@00 000%20test@DSCN1077.JPG
    Il file NON esiste

    mi sa che manca un "\"
    ..: Serie A :..
    ..: FORZA PALERMOOOOoooo.....

  7. #7

  8. #8
    ho rifatto tutto:

    codice:
    strFile1 = "sofia_" & ShowSub & "_" & strPicArray(0,x) 
    strPath1 = "/public/tmp_photo/preview_thumb_sofia_tmp/"
    
    Set objFso1 = Server.CreateObject("Scripting.FileSystemObject") 
    
    strFilePath1 = Server.MapPath(strPath1 & strFile1)
    
    Response.Write "maGGico...: " & strFilePath1 &"
    "
    Response.Write"[img]"&strPath1 & strFile1 &"[/img]"&"
    " <---- l'img qui appare!!!!!!! ma se faccio il controllo mi dice che non esiste
    
    if objFso1.FileExists(strFilePath1) then 
    Response.Write("Il file esiste") 
    
    'Response.Write"[img]"&strPath1 & strFile1 &"[/img]"
    
    else 
    Response.Write("Il file NON esiste") 
    'Response.Write "[img]resizetool.aspx?mode=0&width=50&height=50&path=/sofia/"&ShowSub & "/" & ShowPic& "[/img]"
    end if 
    
    Set objFso = Nothing
    ecco il response della strFilePath1
    maGGico...: D:\inetpub\webs\miositoit\public\tmp_photo\preview _thumb_sofia_tmp\sofia_00000%20test_DSCN1077.JPG

    ..: Serie A :..
    ..: FORZA PALERMOOOOoooo.....

  9. #9
    sei tu che devi controllare se il valore stampato è corretto

  10. #10
    è corretto:
    l'img esiste e se la richiamo direttamente si vede, ma se faccio il controllo if objFso1.FileExists(strFilePath1) mi dice che non esiste!!!!!!!
    ..: Serie A :..
    ..: FORZA PALERMOOOOoooo.....

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.