Explorar o código

生成的PDF增加权限

kevin_zhangl %!s(int64=3) %!d(string=hai) anos
pai
achega
56eaeec714
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      frontendApi/modules/v1/controllers/ShopController.php

+ 2 - 0
frontendApi/modules/v1/controllers/ShopController.php

@@ -525,6 +525,8 @@ ORDER;
         $path = '/pdfs/' . $file_name;
         $pdf->Output(Yii::$app->basePath . '/web' . $path, 'F');
 
+        @exec('chmod -R 777 /' . Yii::$app->basePath . '/web' . $path);
+
         return static::notice(['fileUrl' => $path, 'targetName' => $file_name]);
     }