update : 2015.11.03
php.shukuma.com

검색:
 
 
Move to the next file

FilesystemIterator::next

(PHP 5 >= 5.3.0)

FilesystemIterator::nextMove to the next file

설명

public void FilesystemIterator::next ( void )

Move to the next file.

인수

이 함수는 인수가 없습니다.

반환값

값을 반환하지 않습니다.

예제

Example #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

참고