Forum Moderators: coopster
It depends on your code and what you want, what function you should use. For example, if you generate a string that should point to a file on the server and you want to know whether it exists, use file_exists(). If you are listing the contents of a directory and you want to know if a certain result is a file, use is_file().
To see if something is an image you could use this function:
[php.net...]