Jump to content

[SOLVED] file count


imperium2335

Recommended Posts

Hi quick question.

 

When This script runs it always counts 1 extra but there are only say 3 files in the dir but it counts 4, any ideas? Thanks.

 

$openzone = opendir("php/image-submission") ;

while($file=readdir($openzone))
{
if($file != '.' && $file != '..')
{
	$filecount++ ;
}
}

echo "$filecount" ;

Link to comment
https://forums.phpfreaks.com/topic/152343-solved-file-count/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.