Francisco - São Paulo - Brazil escreveu: > I have this directory structure: > cache/accountcache/0 > cache/accountcache/0/1 > cache/accountcache/0/2 > cache/accountcache/0/3 > cache/accountcache/0/4 > cache/accountcache/0/5 > cache/accountcache/0/6 > cache/accountcache/0/7 > cache/accountcache/0/8 > cache/accountcache/0/9 > > then... > cache/accountcache/1 > cache/accountcache/1/1 > cache/accountcache/1/2 > cache/accountcache/1/3 > cache/accountcache/1/4 > cache/accountcache/1/5 > cache/accountcache/1/6 > cache/accountcache/1/7 > cache/accountcache/1/8 > cache/accountcache/1/9 > > etc... > > In each subdir I have text files with this format: XXXXX_visit_counter.dat > XXXXX = It's a number > > I need, starting from the cache/accountcache, read the content of each > text file. > > Tried this but doesnt work: > $dir = "cache/accountcache"; > if($dh = @opendir($dir)){ > while (($obj = readdir($dh))) { > if($obj=='.' || $obj=='..') continue; > $sub = $dir.'/'.$obj; > echo $sub; > } > } > > > >------------------------------------------------------------------------ > >Internal Virus Database is out-of-date. >Checked by AVG Free Edition. >Version: 7.1.371 / Virus Database: 267.13.13/197 - Release Date: 09/12/2005 > > > -- /*----------------------------*/ When you have a hammer Everything looks like a nail. /*----------------------------*/ ------------------------ Yahoo! Groups Sponsor --------------------~--> Check out the new improvements in Yahoo! Groups email. http://us.click.yahoo.com/6pRQfA/fOaOAA/yQLSAA/saFolB/TM --------------------------------------------------------------------~-> PHP Data object relational mapping generator http://www.metastorage.net/ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-objects/ <*> To unsubscribe from this group, send an email to: php-objects-unsubscribe@xxxxxxxxxxxxxxx <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/