Php/func filesystem ftell
来自菜鸟教程
PHP ftell()函数
例
返回打开文件中读/写指针的当前位置:
<?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)
参数值
| 参数 | 描述 |
|---|---|
| file | 需要。指定要检查的打开文件 |
技术细节
| 返回值: | 文件指针位置,如果失败则为FALSE。 |
| PHP版本: | 4.0+ |