1<?php
2$filename = '/path/to/foo.txt';
3
4if (file_exists($filename)) {
5 echo "The file $filename exists";
6} else {
7 echo "The file $filename does not exist";
8}
9?>
1if (!file_exists('http://mysite.com/images/thumbnail_1286954822.jpg')) {
2$filefound = '0';
3}