![]() |
|
|
+ Search |
![]()
|
Jan 24th, 2001 22:35
Mike Boucher, Brock Sperryn, http://www.php.net/manual/en/function.is-dir.php
is_dir checks to see if $dirname exists and is a directory. If it does
exist and it is a directory then it returns 'true', otherwise it
returns 'false'. So you can use it as follows.
if(is_dir($dirname))
{
echo "Yes, the directory ".$dirname." exists.";
}
else
{
echo $dirname." is not a valid directory.";
}
See http://www.php.net/manual/en/function.is-dir.php for more
information.
More information on directory and file functions can be found at:
directory functions:
http://www.php.net/manual/en/ref.dir.php
filesystem funtions (and some more directory functions):
http://www.php.net/manual/en/ref.filesystem.php
Hope this helps