I used the second code aliendisaster posted.Also, the php version installed is: 4.3.11<?php $totalFiles = 0;$dirname = "test01";if(!($dh=opendir($dirname))) die("Couldn't find ".$dirname);while (!(($file = readdir($dh)) === false)){ if (is_file("$test01/$file")){ $totalFiles ++; }}closedir($dh);?>
I changed it to that.Then, I made the index file have:
<a href="01122.htm"><?php echo "$totalFiles"; ?></a>
Everything seems to be fine, but the link always shows up as 0, no matter if I add files to the dir or not.