0) { $fileName .= '.gz'; } } catch (Exception $e) { } header('Content-Disposition: attachment; filename="'.$fileName.'"'); passthru('mysqldump -u '.$cfg['username'].' --password="'.$cfg['password'].'" '.$cfg['database']); exit(0); } }