Re: [PHP] Determining File Size

2001-07-24 Thread Alnisa Allgood
At 3:39 PM -0700 7/24/01, Bob Scott wrote: >There's a nifty little function called filesize()... > >I've done this before to make human-readable output: > >$my_file = "/path/to/my/file"; > >$file_size = filesize($my_file); > >if ($file_size >= 1073741824) { > $show_filesize = number_format

Re: [PHP] Determining File Size

2001-07-24 Thread Bob Scott
There's a nifty little function called filesize()... I've done this before to make human-readable output: $my_file = "/path/to/my/file"; $file_size = filesize($my_file); if ($file_size >= 1073741824) { $show_filesize = number_format(($file_size / 1073741824),2) . " GB"; } elseif ($file

[PHP] Determining File Size

2001-07-24 Thread Alnisa Allgood
Hi: I've set-up a library/clearinghouse system that basically allows to add papers and materials to a small member only resource library. I'd like to be able to determine the file's size so that it's displayed next to the item, so that people can gage how long it will take to download items.