Re: note 46581 rejected and deleted from function.filesize by notes editor aidan
| From: | Geoffrey McRae | Date: | Sat, 16 Oct 2004 03:51:12 +0000 |
| Subject: | Re: note 46581 rejected and deleted from function.filesize by notes editor aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-78638@lists.php.net to get a copy of this message | ||
can I ask why my original post was removed??
----- Original Message -----
From: <php-notes@lists.php.net>
To: <gnif@spacevs.com>
Sent: Saturday, October 16, 2004 11:29 AM
Subject: note 46581 rejected and deleted from function.filesize by notes
editor aidan
> You are receiving this email because your note posted
> to the online PHP manual has been removed by one of the editors.
>
> Read the following paragraphs carefully, because they contain
> pointers to resources better suited for requesting support or
> reporting bugs, none of which are to be included in manual notes
> because there are mechanisms and groups in place to deal with
> those issues.
>
> The user contributed notes are not an appropriate place to
> ask questions, report bugs or suggest new features; please
> use the resources listed on <http://php.net/support>
> for those purposes. This was clearly stated in the page
> you used to submit your note, please carefully re-read
> those instructions before submitting future contributions.
>
> Bug submissions and feature requests should be entered at
> <http://bugs.php.net/>. For documentation errors use the
> bug system, and classify the bug as "Documentation problem".
> Support and ways to find answers to your questions can be found
> at <http://php.net/support>.
>
> Your note has been removed from the online manual.
>
> ----- Copy of your note below -----
>
> I am reposting this code as I have descovered that people are ripping it
off and caliming authorship. This was removed from php.net and I have no
idea why, the date of the original post was 02-Apr-2004 04:12:
>
> Original Post:
> =======================================
> All the other functions I see on this page are just bloated if else
statements, this is a nice and neat function that will calculate all the way
up to EB and more if you add them to the array $sizes.
>
> function DownloadSize($file) {
> $size = filesize($file);
> $sizes = Array('B', 'KB', 'MB', 'GB', 'TB',
> 'PB', 'EB');
> $ext = $sizes[0];
> for ($i=1; (($i < count($sizes)) && ($size >= 1024)); $i++) {
> $size = $size / 1024;
> $ext = $sizes[$i];
> }
> return round($size, 2).$ext;
> }
>
> ----
> http://www.spacevs.com/index.php?page=phpsnippets
> =======================================
>