FilesystemIterator::next

(PHP 5 >= 5.3.0)

FilesystemIterator::nextMove to the next file

Опис

public void FilesystemIterator::next ( void )

Move to the next file.

Параметри

В цієї функції немає параметрів.

Значення, що повертаються

Не повертає значень.

Приклади

Приклад #1 FilesystemIterator::next() example

List the contents of a directory using a while loop.

<?php
$iterator 
= new FilesystemIterator(dirname(__FILE__));
while(
$iterator->valid()) {
    echo 
$iterator->getFilename() . "\n";
    
$iterator->next();
}
?>

Наведений вище приклад виведе щось подібне до:

apple.jpg
banana.jpg
example.php

Прогляньте Також

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top