标签:字符 printf app fun ISE sprint 写入 style float
private function miclog($t1,$t2,$name){ $lasttime = ($t2 - $t1).‘ms‘; $content = date(‘Y-m-d H:i:s‘,time()).‘ ‘.$lasttime.‘ ‘.$name; file_put_contents(‘/tmp/ssyv4/micro.log‘,$content.PHP_EOL,FILE_APPEND); } // php获取毫秒 private function getMillisecond() { list($s1, $s2) = explode(‘ ‘, microtime()); return (float)sprintf(‘%.0f‘, (floatval($s1) + floatval($s2)) * 1000); }
PHP_EOL 写入字符串换行 , php获取毫秒 microtime
标签:字符 printf app fun ISE sprint 写入 style float
原文地址:https://www.cnblogs.com/pansidong/p/10156012.html