PHP функции для записи логов в файл

function silver_logs_to_file($output, $filename = ‘log’) {     $time = date( «d/m/y, H:i:s») . ‘ — ‘;     $content = $time .  print_r($output, true) . PHP_EOL;     if (!is_dir(__DIR__ . ‘/logs’)) {         mkdir(__DIR__ . ‘/logs’);   }     $filename = __DIR__ . ‘/logs/’ . $filename . ‘.log’;  …

Разделение цены пробелами (JS)

addSpaceToPrice = function(value, count) { if (value != undefined) { price = value.replace(/ /g, «») if (price.indexOf(‘,’) > 0) price = price.substring(0, price.indexOf(‘,’)); fprice = »; price_ln = price.length; if (price_ln > count) { for (i = price_ln; i >= 0; i—) { tmp = i % count === 0 ? ‘ ‘ : »;…