Thread: ASP arghh
View Single Post
Old 09-09-2004, 14:55   #1
Bifta
Inactive
 
Join Date: Jul 2003
Location: Eglinton, Co. Derry
Posts: 7,640
Bifta has a nice shiny starBifta has a nice shiny star
Bifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny star
ASP arghh

I wish I'd written this application in PHP .. but I didn't .. and it's too late now.

Anyway, I have a snippet of code to detect if an image exists which works perfectly on my local web server but not if I upload it to either of my windows hosts.

Code:
<%
Set fs=Server.CreateObject("Scripting.FileSystemObject")

If fs.FileExists ("tBRANCH_" & (Recordset1.Fields.Item("PropertyID").Value) & ".jpg") = true Then
	  Response.write("<img src=tBRANCH_" & (Recordset1.Fields.Item("PropertyID").Value) & ".jpg height=100 width=150>")
Else
      Response.write("<img src=nophoto.gif height=100 width=150>")
End if
%>
It's mystifying me, anyone have any idea what I'm doing wrong? At the moment it assumes the file doesn't exist and displays nophoto.gif for every result
Bifta is offline