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; $filename = __DIR__ . ‘/logs/’ . $filename . ‘.log’; $fh = fopen($filename, «a»); fwrite($fh, $content); fclose($fh); }  

Разделение цены пробелами (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 ? ‘ ‘ : »;…