Thread: File size

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    41
    Rep Power
    15
    I know how to get the file size, but how do I manipulate the return value to express KB instead of bytes?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2000
    Posts
    79
    Rep Power
    15
    Divide by 1024?
    <?
    $b = 20000;
    $kb = bcdiv($b, "1024", 2);
    echo "$kb";
    ?>

    where $b is the size in bytes and $kb is the size in kilobytes
    the 2 represents the number of decimal places

    Basil

Similar Threads

  1. Replies: 1
    Last Post: February 8th, 2004, 02:59 PM
  2. problem in Uploading file of size more than 512k in php
    By ssomvanshi in forum PHP Development
    Replies: 3
    Last Post: February 7th, 2004, 06:32 AM
  3. PHP file upload script trouble
    By casbboy in forum PHP Development
    Replies: 9
    Last Post: February 5th, 2004, 08:42 PM
  4. video capture file size limit
    By scooby74 in forum Windows Help
    Replies: 1
    Last Post: February 5th, 2004, 11:52 AM
  5. Big session file size
    By Denis Basta in forum PHP Development
    Replies: 2
    Last Post: February 2nd, 2004, 09:44 AM

IMN logo majestic logo threadwatch logo seochat tools logo