How To Check If File Exists In A Directory With PHP
Post Description:
Post Tags: how, to, check, if, file, exists, in, a, directory, with, php, free php support, php scripts, php questions, php answers, programming, codes, scripts
This Post Has Been Viewed 771 Times Since Fri Feb 29, 2008 11:21 pm Posted By
hostman with 0 replies
Next Post »»
how to redirect with php header location send from one page to another
if you want to know how you can check if a file exists with php, you can use the
file_exists() function,
EXAMPLE PHP CODE:
<?php
$filename = '/pathto/file.php';
if (file_exists($filename)) {
echo "The file $filename exists";
} else {
echo "The file $filename does not exist";
}
?>
Comments and replies About How To Check If File Exists In A Directory With PHP