Revision: 52317
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at October 19, 2011 23:16 by klovera
Initial Code
function getDirectory($path){ // Directories to ignore when listing output $ignore = array( 'cgi-bin', '.', '..' ); $handle = opendir($path); $dir_arr = array(); $i = 0; while (false !== ($dir = readdir($handle))) { if( !in_array( $dir, $ignore ) ){ if (is_dir("$path/$dir")) { $dir_arr[] = $dir; } } } closedir($handle); return $dir_arr; }
Initial URL
Initial Description
Returns an array of folder names contained within the passed path.
Initial Title
PHP Function: getDirectory
Initial Tags
Initial Language
PHP