php get size of file
$fileSizeInBytes=filesize("/path/to/myfile.txt");
php get size of file
$fileSizeInBytes=filesize("/path/to/myfile.txt");
php file size in mb
public function calc_file_size($bytes) {
if ($bytes >= 1073741824) {
$bytes = ceil($bytes / 1073741824) . ' GB';
} else if ($bytes >= 1048576) {
$bytes = ceil($bytes / 1048576) . ' MB';
} else if ($bytes >= 1024) {
$bytes = ceil($bytes / 1024) . ' KB';
} else if ($bytes > 1) {
$bytes = $bytes . ' bytes';
} else if ($bytes == 1) {
$bytes = $bytes . ' byte';
} else {
$bytes = '0 byte';
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us