September 2001
Intermediate to advanced
768 pages
32h 45m
English
bool file_exists(string filename) Determines whether a file exists.
Returns:
TRUE if the file exists; FALSE on error
Description:
Checks for the existence of a file. It’s a good idea to use this function before other filesystem functions to ensure that the file you need actually exists.
Note:
The results of this function are cached. See clearstatcache() for details.
Example:
if(!file_exists("myfile"))
{
echo ("File not found");
}
|
Read now
Unlock full access