PHP Check if file does not exist

Hi all,

I need to check if a file does not exist in php.

for example:

If File Does NOT Exist {
  Do something
}

No extra condition is needed.

THanks
error77Asked:
Who is Participating?
 
DerokorianCommented:
http://us2.php.net/file_exists

if( !file_exists('/path/to/file.ext') ) {
   // Do something
}

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.