micba
asked on
How can I know if a remote file exist?
Hello,
How can i check in Coldfusion if exist the file: "www.mysite.com/pic.jpg"?
Thanks.
How can i check in Coldfusion if exist the file: "www.mysite.com/pic.jpg"?
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Do u mean remote as in on ur remote server - or ur talking abt some other site altogether ?
ASKER
Thanks mosphat.
Very good.
Very good.
You could use the FileExists function.
In the CFIF tag, call the FileExists function and use the ABSOLUTE PATH for the file.
Although I've never actually gotten this to work properly, it's supposed to work.
<cfif FileExists(idPhoto)>
In the CFIF tag, call the FileExists function and use the ABSOLUTE PATH for the file.
Although I've never actually gotten this to work properly, it's supposed to work.
<cfif FileExists(idPhoto)>
holosimexchange,
FileExists() only works for local files, like C:\blah.txt. You just need to put in the full path to the file. I don't see how you cannot get it to work properly...
FileExists() only works for local files, like C:\blah.txt. You just need to put in the full path to the file. I don't see how you cannot get it to work properly...