...

View Full Version : Listing all files in a directory



SpeedFreak
09-19-2003, 09:04 PM
Hey,

I am using php 4.x.x - how can i list all the files in a directory. I know in PHP 5 you can use scandir() but what about php 4?

Thanks in advance,

Íkii
09-20-2003, 12:02 AM
check readdir in the manual

4.3.0 + could use glob

chdir('/home/site/www/dir');
$files = glob('*.*');

SpeedFreak
09-20-2003, 08:26 AM
Cheersd Okii :thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum