Explorar o código

先获取目录到 $exportDir

visuddhinanda %!s(int64=2) %!d(string=hai) anos
pai
achega
8d99a82dc5
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      app/Console/Commands/ExportCreateDb.php

+ 2 - 1
app/Console/Commands/ExportCreateDb.php

@@ -39,7 +39,8 @@ class ExportCreateDb extends Command
     public function handle()
     {
         $sqlPath = database_path('export/sentence.sql');
-        $exportFile = storage_path('app/public/export/offline/sentence-'.date("Y-m-d").'.db3');
+        $exportDir = storage_path('app/public/export/offline');
+        $exportFile = $exportDir.'/sentence-'.date("Y-m-d").'.db3';
         $file = fopen($exportFile,'w');
         fclose($file);
         $dbh = new \PDO('sqlite:'.$exportFile, "", "", array(\PDO::ATTR_PERSISTENT => true));