update : 2015.11.03
php.shukuma.com검색:
|
SplFileObject::current(PHP 5 >= 5.1.0) SplFileObject::current — Retrieve current line of file 설명
public string|array SplFileObject::current
( void
)
Retrieves the current line of the file. 인수이 함수는 인수가 없습니다. 반환값
Retrieves the current line of the file. If the 예제
Example #1 SplFileObject::current() example
<?php 위 예제의 출력 예시: 1: <?php 2: $file = new SplFileObject(__FILE__); 3: foreach ($file as $line) { 4: echo ($file->key() + 1) . ': ' . $file->current(); 5: } 6: ?> 참고
|