2 /* Prototype: bool is_dir ( string $dirname );
3 Description: Tells whether the dirname is a directory
4 Returns TRUE if the dirname exists and is a directory, FALSE otherwise.
7 /* Testing is_dir() with base and sub dirs */
9 $file_path = dirname(__FILE__
);
11 echo "-- Testing is_dir() with an empty dir --\n";
12 $dirname = $file_path."/is_dir_variation1";
14 var_dump( is_dir($dirname) );
17 echo "-- Testing is_dir() with a subdir in base dir --\n";
18 $subdirname = $dirname."/is_dir_variation1_sub";
20 var_dump( is_dir($subdirname) );
21 var_dump( is_dir($dirname) );
23 echo "\n*** Done ***";
25 $file_path = dirname(__FILE__
);
26 $dir_name = $file_path."/is_dir_variation1";
27 rmdir($dir_name."/is_dir_variation1_sub");