Search code examples
phpphp4

PHP: Tell if a file exists?


I need to be able to tell if an image exists in a directory or not. Given the file name and the directory, how can I tell if it exists?

Thanks!


Solution

  • file_exists($filename);
    

    http://www.php.net/file_exists