PHP/File Directory/filesize
Determining File Size with filesize()
<?
print "The size of test.txt is. ";
print filesize( "test.txt" );
?>
filesize() function returns the size, in bytes.
Its syntax is: int filesize (string filename)
<?
$fs = filesize("data.txt");
print "Pastry.txt is $fs bytes.";
?>
filesize.php
<?php
$file = "data.txt";
$bytes = filesize("$file");
echo "File ".basename($file)." is $bytes bytes, or ".round($bytes / 1024, 2)." kilobytes.";
?>