Seo Forum

Coding & Programming => PHP Forum => Topic started by: chinmay.sahoo on 12-24-2015, 02:44:11

Title: file_exists
Post by: chinmay.sahoo on 12-24-2015, 02:44:11
The file_exists function is a simple function you will use again and again if you use filesystem functions at all. It simply checks the local filesystem for a file of the specified name.

Quoteif (!file_exists("testfile.php")) {
$fd = fopen("testfile.php", "w+");
}

The function returns true if the file exists, false if not found. The results of this test are stored in a cache, which may be cleared by use of the function clearstatcache().