".$sqlFile; $createZip = "tar cvzf $attachment $sqlFile"; exec($creatBackup); exec($createZip); echo "Exported database successfully into the directory:".$tmpDir.""; ob_clean(); $string="application/x-gzip"; header("Content-type: {$string}"); header('Content-Disposition: attachment; filename="'.$name.'"'); readfile($attachment); exit; // End of the code ?>