Explorar el Código

数据库备份

sugar1569 hace 7 años
padre
commit
2263f4b3af
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  1. 4 1
      application/admin/controller/system/SystemDatabackup.php

+ 4 - 1
application/admin/controller/system/SystemDatabackup.php

@@ -166,6 +166,9 @@ class SystemDatabackup extends AuthController
     public function downloadFile(Request $request = null)
     {
         $time = intval($request->param('feilname'));
-        $this->DB->downloadFile($time);
+        $file_url = $this->DB->downloadFile($time);
+        $file=fopen($file_url[0],'r');
+        echo fread($file,filesize($file_url));
+        fclose($file_url);
     }
 }