Flamerule
07-11-2002, 09:13 AM
Is their a special function to count how many space the files are taking up in a directory or must I use the readdir function with a few loops and add the space each file takes individually?
|
||||
DirectoriesFlamerule 07-11-2002, 09:13 AM Is their a special function to count how many space the files are taking up in a directory or must I use the readdir function with a few loops and add the space each file takes individually? Jeewhizz 07-11-2002, 09:44 AM www.php.net/disk-free-space Try that :) Jee Flamerule 07-11-2002, 10:51 AM I don't want the space available I want the space used.... Robbie 07-11-2002, 11:13 PM uh... total_space - free_space = space_that_is_used or am I saying stupid things now? IKinsler 07-12-2002, 06:27 PM If you did use a readdir, you could count each one... while ($file = readdir($dir_var)) { $filesize = $filesize + filesize($file); } echo "The total space used is: " . $filesize; Flamerule 07-12-2002, 07:37 PM Yea I know, just wondering if there was no specific function to do that. Thanks anyways :):D Ökii 07-12-2002, 08:45 PM disk_total_space(string dirname) - http://www.php.net/manual/en/function.disk-total-space.php should do it - I used it today on localhost and got absolutely no return though and ergo went with the filesize(each file) method. Flamerule 07-13-2002, 07:11 AM Thank you :):thumbsup: |
| |||
EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum