소스 검색

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
 class ExportFactory
 {
 {
     public static function create($type, $fileName, $data, $header){
     public static function create($type, $fileName, $data, $header){
+        if (!file_exists(__DIR__.'/../../Resource/')) {
+            mkdir(__DIR__.'/../../Resource/', 0777, true);
+        }
+
         switch ($type){
         switch ($type){
             case 'xls':
             case 'xls':
             case 'csv':
             case 'csv':