GLOB showing all files???

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

GLOB showing all files???

Post by alex.barylski »

This is what I have thus far...

Code: Select all

$arr_files = glob("$path/*.*");
But it doesnt show files without extensions??? :?

I've tried *. and .* and neither produces all files, regardless of file extension or lack thereof...

Any ideas???

Cheers :)
sheila
Forum Commoner
Posts: 98
Joined: Mon Sep 05, 2005 9:52 pm
Location: Texas

Post by sheila »

Have you tried this?

Code: Select all

$arr_files = glob("$path/*");
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post by alex.barylski »

sheila wrote:Have you tried this?

Code: Select all

$arr_files = glob("$path/*");
No I have not, but I will now :)

Edit: Shoot...yes I have actually, but I use it for folders...and they way I generate files/folders won't allow me to use the above :(

I would have to rewrite alot of my code... :)

Ah well...

Thanks anyways
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

You could always use the directory functions...
Post Reply