Explorar el Código

使用 $filename 变量

visuddhinanda hace 3 años
padre
commit
18e9994ace
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  1. 3 2
      app/Console/Commands/ExportNissaya.php

+ 3 - 2
app/Console/Commands/ExportNissaya.php

@@ -49,8 +49,9 @@ class ExportNissaya extends Command
             $channels[] = $value->uid;
         }
         $this->info('channel:'.count($channels));
-        Storage::disk('local')->put("public/export/nissaya.csv", "");
-        $file = fopen(storage_path('app/public/export/nissaya.csv'),"w");
+        $filename = "public/export/nissaya.csv";
+        Storage::disk('local')->put($filename, "");
+        $file = fopen(storage_path("app/$filename"),"w");
         $bar = $this->output->createProgressBar(Sentence::whereIn('channel_uid',$channels)->count());
         foreach (Sentence::whereIn('channel_uid',$channels)->select('content')->cursor() as $sent) {
             $lines = explode("\n",$sent->content);