Page 361 - Beginning PHP 5.3
P. 361

Chapter 11: Working with Files and Directories
                               echo “</ul>”;

                               foreach ( $files as $file ) {
                                 if ( substr( $file, -1 )  == “/” ) traverseDir( “$dir/” . substr( $file,
                              0, -1 ) );
                               }

                               closedir( $handle );
                             }

                             traverseDir( $dirPath );

                             ?>
                               </body>
                             </html>







































                             Figure 11-3










                                                                                                         323





                                                                                                      9/21/09   9:10:20 AM
          c11.indd   323
          c11.indd   323                                                                              9/21/09   9:10:20 AM
   356   357   358   359   360   361   362   363   364   365   366