Reply to Re: Download file size pregress bar

Your name:

Reply:


Posted by Andy Hassall on 11/16/05 02:08

On 15 Nov 2005 16:41:19 -0600, wagon <wagon@hotmail.com> wrote:

>I assume it is the Content-Length: W

Yep.

>What is the conversion for 14.9 megabytes?

Depends whether you work for a hard drive manufacturer, or live in the real
world.

1 megabyte = 1024 * 1024 bytes = 1048576 bytes.

(If you're a pedant then you can call it a "mibibyte").

If you're actually reading from a file, use filesize() to get the size in
bytes. If you send a Content-Length then you have to get it exactly right, else
Bad Things probably happen.

In case you're confused by the terminology in the standard, a "byte" and an
"octet" are, for all intents and purposes, the same thing.
--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация