瀏覽代碼

经验值 改回 字符串输出

visuddhinanda 5 年之前
父節點
當前提交
b4b8c2594c
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      app/ucenter/active_get.php

+ 3 - 3
app/ucenter/active_get.php

@@ -21,10 +21,10 @@ if (isset($userid)) {
     $last = 0;
     while ($row = $sth->fetch(PDO::FETCH_ASSOC)) {
         $curr = $last + $row["duration"] / 3600000;
-        $output[] = array($row["date"], round($last, 3), round($curr, 3), round($last, 3), round($curr, 3), $row["hit"]);
+        $output[] = array($row["date"], number_format($last, 3, ".", ""), number_format($curr, 3, ".", ""), number_format($last, 3, ".", ""), number_format($curr, 3, ".", ""), $row["hit"]);
         $last = $curr;
     }
 
-    echo json_encode($output);
-    //echo str_replace('"','',$json);
+    $json = json_encode($output);
+    echo str_replace('"', '', $json);
 }