1 2 3 4 5 6 7 8 9 | < ?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]; } ?> |
1 2 3 4 5 6 7 8 9 | < ?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:
1 2 3 4 5 6 | < ?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. Citeste mai departe …
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.