< ?php
function human_size($size) {
$units = array('B','KB','MB','GB');
for ($i = 0; $size > 1024; $i++) {
$size /= 1024;
}
return round($size, 2).' '.$units[$i];
}
?>
PHP – Human size format
Leave a reply
< ?php
function human_size($size) {
$units = array('B','KB','MB','GB');
for ($i = 0; $size > 1024; $i++) {
$size /= 1024;
}
return round($size, 2).' '.$units[$i];
}
?>
Am descoperit legatura dintre PHP si emo, sau cum sa blochezi simplu accesul la o pagina:
< ?php
if ($_GET['emo']!='true')
{
exit();
}
?>
Dupa cum puteti vedea, daca nu esti emo true, nu vezi nimic.
P.S. In caz ca va intrebati – da, am uitat sa imi iau pastilele de dimineata.
O functie pentru preluarea URL-ui curent.
Continue reading
De pe un forum al programatorilor care se chinuie sa desluseasca tainele Magento :
The problem is, however, the function is in the wrong class (and file), and I don’t want to modify a core file. Unfortunately, my Kung Fu isn’t strong enough to get it to work without altering the core file, as I’ve been trying for a few hours.