PHP filesize() 函数

PHP 教程 · 2019-01-25 05:57:58

定义和用法

filesize() 函数返回指定文件的大小。

如果成功,该函数返回文件大小的字节数。如果失败,则返回 FALSE。

语法


filesize(filename)


参数 描述
filename 必需。规定要检查的文件。

提示和注释

注释:该函数的结果会被缓存。请使用 clearstatcache() 来清除缓存。

实例


<?php
echo filesize("test.txt");
?> 

上面的代码将输出:


20


点击查看所有 PHP 教程 文章: https://codercto.com/courses/l/5.html

查看所有标签

Think Python

Think Python

Allen B. Downey / O'Reilly Media / 2012-8-23 / GBP 29.99

Think Python is an introduction to Python programming for students with no programming experience. It starts with the most basic concepts of programming, and is carefully designed to define all terms ......一起来看看 《Think Python》 这本书的介绍吧!

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换