How to use ftell function

藏色散人
Release: 2023-04-05 09:42:02
Original
5086 people have browsed it

php ftell() function returns the read/write position of the file pointer.

How to use ftell function

php ftell() function Syntax

Function: Open the current position in the file.

Syntax:

ftell(file)
Copy after login

Parameters:

file Required. Specifies the open file to be checked.

Note: The file pointer file must be valid and must point to a file successfully opened by fopen() or popen().

php ftell() function example

<?php
$file = fopen("./test.txt","r");
// 输出当前位置
echo ftell($file);
?>
Copy after login

This article is an introduction to the PHP ftell function. I hope it will be helpful to friends in need!

The above is the detailed content of How to use ftell function. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template