PHP filesize functions
FileSize(PHP 4, PHP 5)filesize-Get File sizeDescribeInternational filesize (string $ file name)Gets the size of the given file.ParametersFilenameThe file path.return valueReturns the size of the file in bytes, or false (and
My need is to write a script that creates a 700kb file with the following code:
问题是,发现产生了死循环,while条件使用为真!运行结果如下:
根本原因的是while循环中的filesize 函数返回的始终是24?不明白是什么原因?
Reply content:
My need is to write a script that creates a 700kb file with the
FileSize functions, parsing,
Warning:filesize () [Function.filesize]: Stat failed for Backup 1 of Wampmanager.ini.install in D:\wamp\www\dir\dir2.php o N Line 10
Backup 1 of Wampmanager.ini.install is a file with a size of
Warning:filesize ()
I need to write a script to create a 700kb file. The Code is as follows: {code ...}
I need to write a script to create a 700kb file. The Code is as follows:
The problem is that an infinite loop is generated, and the while condition is true! The
In php, there is a function that comes with the system to calculate the file size, that is, filesize (), but this function is in bytes. in some cases, we need to intuitively understand the size of a file, not only the unit of Byte B, but also the
PHP static page generation tutorial. let's review some basic concepts first.
I. PHP scripts and dynamic pages.
A PHP script is a server-side scripting program that can be mixed with HTML files by embedding methods, classes, function encapsulation,
The php has a system-by-File size function, which is filesize (), but this function is in bytes, in some cases, we need to be very intuitive to understand a file size, not only need byte B this unit, but also need KB,MB,GB, Even bigger TB,PB, so
For example, if you encounter a large file named 49957289167B, you can see that the unit behind such a long string of numbers is byte B, but you still don't know the concept of the file size, we convert it to GB, Which is 46.53 GB. You can use the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.