2018-12-06, 20:56:14
(2018-12-06, 14:57:59)Oleg06 Wrote: https://prnt.sc/lrby66
https://prnt.sc/lrbyfl
with php 5.6 there is no such
Code:Notice: A non well formed numeric value encountered in /home/u915147/mydomen.ru/html/admin/inc/basic.php on line 1198
it helped
PHP Code:
function toBytes($str){
$val = trim($str);
$last = strtolower($str[strlen($str)-1]);
if (!is_numeric($last)) {
$val = substr($val,0,strlen($val)-1);
switch($last) {
case 'g': $val *= 1024;
case 'm': $val *= 1024;
case 'k': $val *= 1024;
}
}
return $val;
}