PHP ftell() 함수
❮ PHP 파일 시스템 참조예시
열린 파일에서 읽기/쓰기 포인터의 현재 위치를 반환합니다.
<?php
$file = fopen("test.txt","r");
// Print current position
echo ftell($file);
// Change current position
fseek($file,"15");
// Print current position again
echo "<br>" . ftell($file);
fclose($file);
?>
정의 및 사용
ftell() 함수는 열린 파일에서 읽기/쓰기 포인터의 현재 위치를 반환합니다.
통사론
ftell(file)
매개변수 값
Parameter | Description |
---|---|
file | Required. Specifies the open file to check |
기술적 세부 사항
반환 값: | 파일 포인터 위치 또는 실패 시 FALSE입니다. |
---|---|
PHP 버전: | 4.0+ |
❮ PHP 파일 시스템 참조