All pastes #147210 Raw Edit

Sh4d03

public text v1 · immutable
#147210 ·published 2006-08-24 06:10 UTC
rendered paste body
 $path = "/home/allstate/public_html/client"; // <-- Path to the location of files

                        function getList($path)

                        {

                                $dh=opendir($path);

                                while($file=readdir($dh))

                                {

                                        if ($file=='.' || $file=='..') continue;

                                        {
                                                $completepath="$path/$file";

                                        }

                                        if (is_dir($completepath))

                                        {
                                                # its a dir, recurse.
                                               getList($path.'/'.$file);
                                                $dirArray[$i] =  "Client: $path/$file<br>\n";
                                                $i++;
                                        }

                                         else

                                        {

                                                # its a file.
                                                $listArray[$j] = "-- $path/$file<br>\n";
                                                $j++;

                                        }

                                }

                        }