list direcotry problem using is_file and is_dir
Posted: Sat Oct 26, 2002 7:19 pm
"Hello,
i am trying to list the contents of a direcotry based on whether it is a file or dir but i am having a problem and i cna tidentitfy it
CODE_--------
if ($AUTH !== ("level1" || "admin"))
{
while(list($k,$filename)=each($DIRFILES))
{
if(is_file($filename)){
echo "<a href=index.php?filename=".$filename."&download=true>".$filename."</a><br>";
}
}
}
-------------
the thing is based on the $AUTH variable if it didnt match i would print out the files and not the direcotry
but i dont get anything
if i were to remove the (is_file()) i would get the listing of everything
what seems to be the problem here cause i dont get it
Kendall
i am trying to list the contents of a direcotry based on whether it is a file or dir but i am having a problem and i cna tidentitfy it
CODE_--------
if ($AUTH !== ("level1" || "admin"))
{
while(list($k,$filename)=each($DIRFILES))
{
if(is_file($filename)){
echo "<a href=index.php?filename=".$filename."&download=true>".$filename."</a><br>";
}
}
}
-------------
the thing is based on the $AUTH variable if it didnt match i would print out the files and not the direcotry
but i dont get anything
if i were to remove the (is_file()) i would get the listing of everything
what seems to be the problem here cause i dont get it
Kendall