Cable Forum

Cable Forum (https://www.cableforum.uk/board/index.php)
-   General IT Discussion (https://www.cableforum.uk/board/forumdisplay.php?f=19)
-   -   ASP arghh (https://www.cableforum.uk/board/showthread.php?t=17282)

Bifta 09-09-2004 14:55

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 09-09-2004 15:05

Re: ASP arghh
 
Could somebody close this, I've fixed it, ta.

Chris 09-09-2004 15:09

Re: ASP arghh
 
Done. :)


All times are GMT. The time now is 23:54.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum