September 2001
Intermediate to advanced
768 pages
32h 45m
English
bool is_dir(string filename) Checks whether a file is a directory.
Returns:
TRUE if a directory; FALSE otherwise
Description:
Checks whether the specified file is a directory or a symlink to a directory, as opposed to a regular file or a link.
Note:
The results of this function are cached. See clearstatcache() for details.
Example:
$dir = "test_dir";
if(is_dir($dir))
{
echo ("$dir is a directory.");
}
else
{
echo ("$dir is a link or a file.");
}
|
Read now
Unlock full access