diff options
Diffstat (limited to 'application/helpers')
-rw-r--r-- | application/helpers/filebin_helper.php | 10 | ||||
-rw-r--r-- | application/helpers/index.html | 10 |
2 files changed, 20 insertions, 0 deletions
diff --git a/application/helpers/filebin_helper.php b/application/helpers/filebin_helper.php new file mode 100644 index 000000000..3d6c30b76 --- /dev/null +++ b/application/helpers/filebin_helper.php @@ -0,0 +1,10 @@ +<?php + +// Source: http://ibnuyahya.com/format-bytes-to-kb-mb-gb/ +function format_bytes($size, $precision = 2){ + $base = log($size) / log(1024); + $suffixes = array('B', 'kB', 'MB', 'GB', 'TB' , 'PB' , 'EB'); + return round(pow(1024, $base - floor($base)), $precision) . $suffixes[floor($base)]; +} + +# vim: set noet: diff --git a/application/helpers/index.html b/application/helpers/index.html new file mode 100644 index 000000000..c942a79ce --- /dev/null +++ b/application/helpers/index.html @@ -0,0 +1,10 @@ +<html> +<head> + <title>403 Forbidden</title> +</head> +<body> + +<p>Directory access is forbidden.</p> + +</body> +</html>
\ No newline at end of file |