Determining the Size of a File : File Property « File Directory « PHP

Determining the Size of a File

  $myfile = "./test.txt";

  if (file_exists ($myfile)) {
    $checksize=filesize ($myfile);
    echo "$checksize";
  } else {
    echo "The file doesn't exist!";

Related examples in the same category

1.Is it a file: is_file()
2.Is the file a directory: is_dir()
3.Is the file readable: is_readable()
4.Is the file writable: is_writable()
5.File changed time
6.File modified time
7.File accessed time
8.Checking the Mode of a File
9.Get the file size: filesize
10.Is the file executable: is_executable
11.filegroup: Gets file group
12.File last changed time
13.File last accessed time
14.Get the file owner
15.Get file permission
16.File last updated time