ソースを参照

updated export to create folder

Jean Sumara 5 年 前
コミット
c07e666285
1 ファイル変更4 行追加0 行削除
  1. 4 0
      src/App/Factory/ExportFactory.php

+ 4 - 0
src/App/Factory/ExportFactory.php

@@ -11,6 +11,10 @@ use Flowdat\Export\App\Exporter\ExporterXml;
 class ExportFactory
 {
     public static function create($type, $fileName, $data, $header){
+        if (!file_exists(__DIR__.'/../../Resource/')) {
+            mkdir(__DIR__.'/../../Resource/', 0777, true);
+        }
+
         switch ($type){
             case 'xls':
             case 'csv':