Search
Syndication
Sponsors

Check a file exists

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)


Check a file exists using the file_exists function

<?php
$filename = ‘test.csv’;

if (file_exists($filename))
{
print “The file $filename exists”;
}
else
{
print “The file $filename does not exist”;
}
?>

Related posts:

  1. Check Service Exists check if a service exists on a port using PEAR...
  2. FTP file upload example upload a single file to a FTP server // FTP...
  3. File list of a folder <?php //folder to check $folder = “C:/xampp/htdocs/xampp/wordpress/wp-includes”; $handle = opendir($folder);...
  4. create a gzip file this example backs up the index.php as a gzip file...

Related posts brought to you by Yet Another Related Posts Plugin.



Tags:

Leave a Reply