PHP ftell() 函数
PHP 教程
· 2019-01-25 08:59:23
定义和用法
ftell() 函数返回在打开文件中的当前位置。
返回文件指针的当前位置,如果失败则返回 FALSE。
语法
ftell(file)
| 参数 | 描述 |
|---|---|
| file | 必需。规定要检查的已打开文件。 |
实例
<?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);
?>
上面的代码将输出:
0 15
点击查看所有 PHP 教程 文章: https://codercto.com/courses/l/5.html
计算机科学概论(第7版) (平装)
J.Glenn Brookshear / 王保江 / 人民邮电出版社 / 2003-9 / 49.0
《计算机科学概论(第2版)》更新了部分内容,使其更加贴近于计算机科学领域内的最新趋势,这包括了网络安全、开源运动、关联存储、公钥加密、XML、Java和C#等内容。扩充了网络和Internet所覆盖的内容。一个程序用C#语言编写,还有C、C++和Java,作为语言的例子。不过整个方法依旧保持语言的独立。一起来看看 《计算机科学概论(第7版) (平装)》 这本书的介绍吧!