FilesystemIterator::next

(PHP 5 >= 5.3.0, PHP 7)

FilesystemIterator::nextMove to the next file

Opis

public FilesystemIterator::next ( void ) : void

Move to the next file.

Parametry

Ta funkcja nie posiada parametrów.

Zwracane wartości

Nie jest zwracana żadna wartość.

Przykłady

Przykład #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();
}
?>

Powyższy przykład wyświetli coś podobnego do:

apple.jpg
banana.jpg
example.php

Zobacz też:

add a note add a note

User Contributed Notes

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