Re: filecount
| From: | Zak Greant | Date: | Thu, 07 Sep 2000 10:52:15 +0000 |
| Subject: | Re: filecount | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-2490@lists.php.net to get a copy of this message | ||
Use the directory functions to retrieve the list of file names.
Filter out undesirable listings (like '.', '..' and directories)
Place the filtered files into an array
count the length of the array
hth,
- Zak
----- Original Message -----
From: "Warwick Chapman (Budgee)" <Budgee@ghs.kzn.school.za>
To: <php-windows@lists.php.net>
Sent: Thursday, September 07, 2000 4:43 AM
Subject: [PHP-WIN] filecount
> Hi Guys
>
> Any ideas how I would use php to count the number of files in a
> directory.
>
> I am writing a navigation script for our intranet
> (reserved1.glenwoodhighschool.co.za) and I need to count the
> number of files, so I know when I am on the last one, I mustn't
> display a "next" link.
>
> Any ideas.
>
> Thanks
>
> Warwick Chapman (1999)
> Assistant IT Manager
> Glenwood High School, Durban, South Africa
> 031 2055241
> 083 7797094
> www.glenwoodhighschool.co.za
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
> For additional commands, e-mail: php-windows-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>