How to use filesize function

藏色散人
Release: 2023-04-05 08:46:02
Original
2607 people have browsed it

php filesize() function is used to obtain the file size.

How to use filesize function

php filesize() function Syntax

Function: Return the size of the specified file.

Syntax:

filesize(filename)
Copy after login

Parameters:

filename Required. Specifies the documents to be checked.

Description: If successful, the number of bytes of the file size is returned. On failure, returns false and generates an E_WARNING level error.

php filesize() function example

<?php
$file = filesize("./test.txt");
echo $file;
?>
Copy after login

Output:

51
Copy after login

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

The above is the detailed content of How to use filesize 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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!