PHP filesize() function and example

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

 
 

Share on Google+Share on Google+

PHP filesize() function and example

Ads

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

Ads

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