DirectoryIterator::seek ?
Posted: Mon Jul 27, 2009 5:32 pm
I have recently started using DirectoryIterator. (php v 5.2.8 ) The methods I have tried so far do work, except seek. If I try the following code, I get a correct 'count' but then php complains:
"Fatal error: Call to undefined method DirectoryIterator::seek()"
have I missed something basic?
thanks
"Fatal error: Call to undefined method DirectoryIterator::seek()"
Code: Select all
$dir = new DirectoryIterator( '//Servername/QA/Builds' );
$count = 0;
while($dir->valid()) {
$dir->next();
$count++;
}
echo $count;
while($count > 0 ) {
$dir->seek($count--);
......
}
thanks