View Full Version : How can I know if a file exits or not?!

07-01-2005, 07:49 PM
I'm working on a page where I have to show many pictures depending on date. It does quite good ;) , but sometimes the figure does not exits and it just shows the alt comment in a empty box. I wonder if I could do anything in order to find out if the figure exits or not in order to avoid the empty box?
Does any of you have an idea?

07-01-2005, 08:10 PM
Call the file_exists( file ) function.
Nice to see someone actually using PHP... the server-side forums here are depressingly barren :p

07-08-2005, 01:52 PM
Thanks! It works