RE: [PHP] List Files
| From: | Matthew Luchak | Date: | Thu, 19 Apr 2001 12:44:35 +0000 |
| Subject: | RE: [PHP] List Files | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-49358@lists.php.net to get a copy of this message | ||
$path='/root/helpfiles/';
$dir_handle = opendir($path);
while ($file = readdir($dir_handle)) {
if ((ereg("help",$file)){
INCLUDE "$path$file";
OR
echo '<A HREF=".$path$file.'">'.$file.'</A>
}
}
____________________________
Matthew Luchak
Webmaster
Kaydara Inc.
mluchak@kaydara.com
-----Original Message-----
From: KPortsmout@aol.com [mailto:KPortsmout@aol.com]
Sent: Thursday, April 19, 2001 8:25 AM
To: php-general@lists.php.net
Subject: [PHP] List Files
Hi,
Does anyone know how I can list all the files begining with help in one
of my
pages.
So I have a dir which has various files, like so:
help_me.php
help_you.php
help_us.php
Is there some command I can use to select all the files and then print
them
out?
TIA
Ade
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net