Current Location: Home> Function Categories> filesize

filesize

Get file size
Name:filesize
Category:File system
Programming Language:php
One-line Description:Returns the file size.

Definition and usage

The filesize() function returns the size of the specified file.

If successful, the number of bytes of the file size is returned. If it fails, false is returned and an E_WARNING-level error is generated.

Example

 <?php
echo filesize ( "test.txt" ) ;
?>

Output:

 20

grammar

 filesize ( filename )
parameter describe
filename Required. Specify documents to be inspected.
Similar Functions
  • Format input from a file fscanf

    fscanf

    Formatinputfromafile
  • Find file paths that match patterns glob

    glob

    Findfilepathsthatmat
  • Create a new directory mkdir

    mkdir

    Createanewdirectory
  • Read a line from a file pointer fgets

    fgets

    Readalinefromafilepo
  • Lightweight consultation file locking flock

    flock

    Lightweightconsultat
  • Returns the normalized absolute path name realpath

    realpath

    Returnsthenormalized
  • Get the inode of the file fileinode

    fileinode

    Gettheinodeofthefile
  • Change the current umask umask

    umask

    Changethecurrentumas
Popular Articles