CruzIT
Monday April 15, 2024 - 8:55:05 PM

Registered Linux User #440901    


 
Login    Register
Login Required

PHP File Size Information

To get the size of a file with php use this function:

<?php
$thefile="yourfile.txt"
function filesize_readable($pathz)
{
$fsize = filesize($pathz);
$runits = array( 'B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');
$mult = $fsize > 0 ? floor(log($fsize, 1024)) : 0;
return number_format($fsize / pow(1024, $mult), 2, '.', ',') . ' ' . $runits[$mult];
}
print("The file " . $thefile . " is " . filesize_readable($thefile));
?>

The above function could be used in conjunction with the gzip function and/or included in your functions include file(s).

If you would like some information on how to do something use the Contact Page. Someone will get back with you with an answer.

“Windows - Just Say No”

Time since last reboot: 6 days, 9 hours, 39 minutes, 33 seconds

Page generated in zero point three seven (0.37) seconds.

@ Active Member Project Honeypot  email addresses

This page was last modified on 12/21/18 @ 11:55:49:pm
This file name: info_php_filesize.php

Questions, Comments, Suggestions or Requests should be sent to:  ronnie@cruzit.com 

There have been  10634  Unique Visitors (IP Addresses) to this site.

Current users online : 19
Maximum users at a time : 60
Last 25 attacks have come from:
85.120.244.156
15.168.15.153
185.196.11.45
191.101.3.32
167.71.225.43
34.143.140.159
34.124.211.247
82.223.128.176
45.125.239.179
167.235.6.168
212.8.253.179
159.223.4.223
178.208.169.231
105.113.104.40
185.126.202.247
194.163.144.86
143.198.223.8
107.180.109.11
157.245.196.160
47.128.52.66
51.68.230.136
128.90.136.145
128.90.43.138
159.89.91.227
207.180.248.15

There are currently 25 unique IP addresses blacklisted.

Public cruzit.com Server Status
server online dbc001  db cluster service
 Is On-Line
server online www03  web service
 Is On-Line
server online www  web service
 Is On-Line
server online mx 08  mail service
 Is On-Line
server online www ha  F/O web service
 Is On-Line
server online mx 11  mail service
 Is On-Line
server online Primary  Client DNS
 Is On-Line
server online Secondary  Client DNS
 Is On-Line

©Copyright 2004-2024 - cruzit.com - Redd Enterprises™, Inc.,  All Rights Reserved.
Ubuntu® is a registered trademark of Canonical Ltd.
Linux® is a registered trademark of Linus Torvalds.
Apache® is a registered trademark of The Apache Software Foundation.
PHP® is a registered trademark of The PHP Group.
The MariaDB® a registered trademark of the MariaDB Corporation Ab.
MySQL® is a registered trademark of the Oracle Corporation Inc.
All other product and service names mentioned are the trademarks of their respective companies.

 

pretrial
pretrial
pretrial
pretrial
Let us know what you think! finance@homelandcomputersecurity.com