note 61233 modified in function.filesize by danbrown

From: Date: Sun, 18 Jan 2009 18:10:29 +0000
Subject: note 61233 modified in function.filesize by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-149418@lists.php.net to get a copy of this message
If you are trying to find a way to get the filesize for files over 2GB, you can always use exec() and run a system command to return the value. The following works on my linux box: <?php $sizeInBytes = filesize($path); if (!$sizeInBytes) { $command = "ls -l \"$path\" | cut -d \" \" -f 6"; $sizeInBytes = exec($command); } ?> --was-- If you are trying to find a way to get the filesize for files over 2GB, you can always use exec() and run a system command to return the value. The following works on my linux box: $sizeInBytes = filesize($path); if (!$sizeInBytes) { $command = "ls -l \"$path\" | cut -d \" \" -f 6"; $sizeInBytes = exec($command); } http://php.net/manual/en/function.filesize.php

« previous php.notes (#149418) next »