On Wed, Jan 24, 2001 at 01:48:29PM +0200, [EMAIL PROTECTED] wrote:
> Hi all 
> 
> I'm trying to use is_dir to go thru a dir to list all dirs of that 
> 
> I have a dir with 3 other dirs in them
> 
> [root@universe templates]# pwd
> /www/docs/webit/admin/templates
> [root@universe templates]# ls -l
> total 12
> drwxr-xr-x   4 root     root         4096 Jan 12 13:16 1/
> drwxr-xr-x   4 root     root         4096 Jan 12 13:16 2/
> drwxr-xr-x   2 root     root         4096 Jan 12 13:16 CVS/
> 
> 
> when I run this script section it only shows the CVS .. 
> 
> <?
> $handle=opendir('/www/docs/webit/admin/templates');
> echo "Directory handle: $handle\n";
> echo "Files:<br>";
> while (($file = readdir($handle))!==false) {
Are you sure it should !== and not != ?

>   if (is_dir($file)){
>     print "$file<BR>";
>   } 
> }
> closedir($handle);
> ?>
> 


/Daniel
-- 
Contact:
email: [EMAIL PROTECTED] | UIN: 635335
Fortune:
Ban the bomb.  Save the world for conventional warfare.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to