How To Check If File Exists In A Directory With PHP
how to check if file exists in a directory with php
how, to, check, if, file, exists, in, a, directory, with, php
How To Check If File Exists In A Directory With PHP
Post Description: how to check if file exists in a directory with php
POST# 480
Posted On: Fri Feb 29, 2008 12:01 pm
web hosting
Topic: How To Check If File Exists In A Directory With PHP
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";
}
?>


No Repies
(0) Comments for How To Check If File Exists In A Directory With PHP

What do you think?

* name:  

* email:  

* Please enter comments:


Receive Replies on my Comments
(An email will be sent to you when someone replies to your comments)

Add image to comments
yes no             upload