|
@@ -616,3 +616,17 @@ if (!function_exists('getMillisecond')) {
|
|
|
return (float)sprintf('%.0f', (floatval($t1) + floatval($t2)) * 1000);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+function createUniqueNo($prifix = 'P',$id = 0)
|
|
|
+{
|
|
|
+ $s = 0;
|
|
|
+ $ms = 0;
|
|
|
+ list($ms, $s) = explode(' ', microtime());
|
|
|
+
|
|
|
+ $ms = substr($ms, 2, 6);
|
|
|
+
|
|
|
+ $rt = $prifix.date('YmdHis', $s).$ms.rand(10, 99).$id;
|
|
|
+
|
|
|
+ return $rt;
|
|
|
+}
|