Showing posts with label PHP check a file exists. Show all posts
Showing posts with label PHP check a file exists. Show all posts

Friday, 5 June 2015

PHP: Check a file exists

<?php
$filename = 'test.csv';
if (file_exists($filename)){
print "The file $filename exists";
}else{
print "The file $filename does not exist";
}
?>