Search results for 'file_exists'. 1 post(s) found.

  1. 2007/10/16 How to check if a file exists ?
2007/10/16 08:37

How to check if a file exists ?


To determine whether a file exists on the server, PHP has a simple function: file_exists.

<?php
$filename = '/optional/path/file.txt';

if (file_exists($filename)) {
   echo "The file $filename exists";
} else {
   echo "The file $filename does not exist";
}
?> 

Trackback 3 Comment 0

Trackback : Cannot send a trackbact to this post.

  1. Subject different money making ideas

    Tracked from moneyideas 2010/01/29 04:49 delete

    moneyideas

  2. Subject different money making ideas

    Tracked from moneyideas 2010/01/29 13:40 delete

    moneyideas

  3. Subject different money making ideas

    Tracked from moneyideas 2010/01/31 16:42 delete

    moneyideas