get Filesize PHP

They have: 218 posts

Joined: Apr 2001

Problem solved....

Renegade's picture

He has: 3,022 posts

Joined: Oct 2002

Mind if I ask how?

He has: 1,016 posts

Joined: May 2002

<?php
$mySize
= filesize(\"/path/to/file.txt\");
?>

More info @ http://www.php.net/filesize

They have: 218 posts

Joined: Apr 2001

This is more what I had in mind, Flash MX compatible:

function filesizeTotals ($curArray){
$thisArray = $curArray;
$num=sizeof($thisArray);
for ($i=0;$i<$num;$i++){
if ($handle = opendir($thisArray[$i])) {
while (false !== ($file = readdir($handle))) {
if (is_file($thisArray[$i]."/".$file)){
$filesizes += filesize($thisArray[$i]."/".$file);
}
}
}
}
closedir($handle);
print "&fileSVar=$filesizes";
}

Renegade's picture

He has: 3,022 posts

Joined: Oct 2002

Thanks Laughing out loud

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.