I am back..with couple of hours working on file search in directories and sub directories..i figured on my own. Its pretty easy to search a file in directories and sub directories at a time.
A small template design to show search text box is already posted in my previous post
Lets go directly to the main code..here is the snippet..
$path = realpath(‘C:\wamp\www\apps’);
foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path)) as $filename)
foreach( $resultspath as $value)
Output will display filename that are existed in directory and sub-directory.
Say i was trying to find a “zend.jpg” file from the above folder structure..just type zend and hit enter..now you can view 2 paths as listed above. Hope it helps you.. 😀
Stay tuned to sathyalog 🙂