is_dir
is_dir
Tells whether the filename is a directory
bool **is_dir** string $filename
Tells whether the given filename is a directory.
filename
Path to the file. If is a relative
filename, it will be checked relative to the current working
directory. If is a symbolic or hard link
then the link will be resolved and checked. If you have enabled
further
restrictions may apply.
filename``filenameopen_basedir
Returns true if the filename exists and is a directory, false otherwise.
Voorbeeld: example
<?php
var_dump(is_dir('a_file.txt'));
var_dump(is_dir('bogus_dir/abc'));
var_dump(is_dir('..')); //one dir up
?>
bool(false)
bool(false)
bool(true)
chdir``dir``opendir``is_file``is_link