Share on Google+Share on Google+

PHP filesize() function and example

Advertisement
In this part of PHP tutorial we will learn about the filesize() function and its examples

Syntax

  • int filesize(file_name)
  • It gives the size in bytes. 


Example of filesize() Function in PHP

<?php

    $size=filesize("c:/rose1/ram.txt");
    echo
"size is ".$size." bytes";

?>

Output
size is 20 bytes

Advertisements

Advertisement

Posted on: October 29, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.