note 88787 modified in function.filesize by danbrown

From: Date: Sat, 07 Feb 2009 18:16:35 +0000
Subject: note 88787 modified in function.filesize by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-150366@lists.php.net to get a copy of this message
reliably, quick & dirty: <?php function getdirsize($path) { $result=explode("\t",exec("du -hs ".$path),2); return ($result[1]==$path ? $result[0] : "error"); } ?> --was-- reliably, quick & dirty: function getdirsize($path) { $result=explode("\t",exec("du -hs ".$path),2); return ($result[1]==$path ? $result[0] : "error"); } http://php.net/manual/en/function.filesize.php

« previous php.notes (#150366) next »