News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Antoine Ughetto's Blog:
Easy way to find a file in subdirectory with php
February 18, 2008 @ 11:15:00

Antoine Ughetto has posted an easy way to find a file inside any series of subdirectories with PHP:

I've made a previus post on SPL using RecursiveIterator to parse Array. Today we will use this same RecursiveIterator with a DirectoryRecursiveIterator.

The code is pretty simple and straight forward - a DirectorySearch class that takes in the directory name and recurses through the files and subdirectories to locate the file you're looking for.

0 comments voice your opinion now!
directoryrecursiveiterator find file subdirectory


blog comments powered by Disqus

Similar Posts

DevShed: Finding Paths, Timestamps and More with the DirectoryIterator Class in PHP

FrSIRT: Vivvo Article Management CMS SQL Injection and PHP File Inclusion Vulnerabilities

Paul Jones: Leanpub Sample Files With Symfony and Aura

Sebastian Bergmann's Blog: Test Runner Improvement in PHPUnit 3.3

Web Development Blog: Tutorial: FTP Upload via cURL


Community Events





Don't see your event here?
Let us know!


unittest language framework symfony library api package community laravel install tips bugfix interview series opinion release deployment introduction podcast zendserver

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework