From:             [EMAIL PROTECTED]
Operating system: Windows XP Home
PHP version:      4.2.3
PHP Bug Type:     Feature/Change Request
Bug description:  feature request count_files() and count_directories()

I think it would be handy to have these 2 functions. The difference is that
one would count files and the other counts directories, like you probably
guessed it.

For example, if you d'like to count files ending with php3 and
directories, you would do this :

---
//Opens a directory and counts files and folders in it
$dir = opendir(string path);
 $files = count_files($dir, "php3");
 $directories = count_directories($dir);
closedir($dir);

//Outputs the number of files and directories
echo $files;
echo "<br>";
echo $directories;
---

If you d'like to count every files you would put nothing in the extension
parameter

I know there's a way to count files and directories but it would be a
"shortcut" function.


Thanks,

PsykX
(Sorry for my english...)
-- 
Edit bug report at http://bugs.php.net/?id=19772&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=19772&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=19772&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=19772&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=19772&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=19772&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=19772&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=19772&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=19772&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=19772&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=19772&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=19772&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=19772&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=19772&r=isapi

Reply via email to