Browse Source

dumpCSV: add BOM to prevent Chinese garbled in Excel

Signed-off-by: Beta Soft <betaxab@gmail.com>
Beta Soft 4 years ago
parent
commit
575bbe5174
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/Http/Controllers/Admin/UserController.php

+ 1 - 1
app/Http/Controllers/Admin/UserController.php

@@ -133,7 +133,7 @@ class UserController extends Controller
             $subscribeUrl = $baseUrl . '/api/v1/client/subscribe?token=' . $user['token'];
             $data .= "{$user['email']},{$balance},{$commissionBalance},{$transferEnable},{$notUseFlow},{$expireDate},{$planName},{$subscribeUrl}\r\n";
         }
-        echo $data;
+        echo "\xEF\xBB\xBF" . $data;
     }
 
     public function generate(UserGenerate $request)