<?php
$filename = '/path/to/foo.txt';
if (file_exists($filename)) {
echo "The file $filename exists";
}
?>
That script only checks if a file exists, but how do I do something like this?
<?php
$filename = '/path/to/foo.txt';
if (file doesnt exist) {
exit("Your file doesn't exist");
}
?>
if (!file_exists($filename)) {