Home Tutorial Php Phpfiles PHP filesize() function and example

 
 

PHP filesize() function and example
Posted on: October 29, 2009 at 12:00 AM
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

Related Tags for PHP filesize() function and example:


Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.