downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

SplFileObject::ftruncate> <SplFileObject::fstat
[edit] Last updated: Fri, 25 May 2012

view this page in

SplFileObject::ftell

(PHP 5 >= 5.1.0)

SplFileObject::ftellファイルポインタの現在位置を返す

説明

public int SplFileObject::ftell ( void )

ファイルストリームにおいて現在のオフセットを表すファイルポインタの現在位置を返します。

パラメータ

この関数にはパラメータはありません。

返り値

ファイルポインタの位置を整数として、もしくはエラーのときは FALSE を返します。

例1 SplFileObject::ftell() の例

<?php
$file 
= new SplFileObject("/etc/passwd");

// 最初の行を読み込む
$data $file->fgets();

// どこにいるのか?
echo $file->ftell();
?>

参考

  • ftell() - ファイルの読み書き用ポインタの現在位置を返す



add a note add a note User Contributed Notes SplFileObject::ftell
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites