Check a file exists
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:
- Check Service Exists check if a service exists on a port using PEAR...
- FTP file upload example upload a single file to a FTP server // FTP...
- File list of a folder <?php //folder to check $folder = “C:/xampp/htdocs/xampp/wordpress/wp-includes”; $handle = opendir($folder);...
- 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: file_exists



















