help with function scan directorys

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
john6000
Forum Newbie
Posts: 1
Joined: Wed May 23, 2007 4:05 pm

help with function scan directorys

Post by john6000 »

Hi, I'm having a problem, im using the function from here to scan directorys

http://lixlpixel.org/recursive_function ... tory_scan/

but I Don't know how to get it to do sub directorys :/

can anyone help?
:oops:
djot
Forum Contributor
Posts: 313
Joined: Wed Jan 14, 2004 10:21 am
Location: planet earth
Contact:

Post by djot »

-
I didn't really read through the linked function, but it says it is recursivly.

So just call the function and look what is returned.

Code: Select all

<?php

$directories = scan_directory_recursively('PATH_OF_DIRECTORY_TO_SCAN');
print '<pre>';
var_dump($directories);
print '</pre>';

?>
djot
-
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

I've said this before, and I'll say it again, feyd has made a very nice snipplet to scan directories without recursion viewtopic.php?p=256504#256504, and the previous post before that is the php5 version. :P
Post Reply