Hi,
i found the below file on this board a while ago.. i edited it a bit and it worked fine on windows.. now im trying to use it on linux and i get no errors but it just doesnt work properly..
it is supossed to count the amount of files in a directory.. in linux it just returns 0 every time.
<?
$dir = "/home/httpd/htdocs/texts/windows/";
$d = dir($dir);
$i=0;
while($entry=$d->read()) {
if(is_file($entry)) {
$i++;
}
}
echo "(<b>$i</b>)";
$d->close();
?>
any ideas as to how i can get it to work? or sujest a better method of counting files in a directory?
Thank you.