こーいったものを使わない状況であることが非常に望ましいですが、
大変ややこしいケースの場合は使わざるを得ないようです。
<?php
header('Content-Type: application/force-download');
$disposition = 'Content-Disposition: attachment; filename=%s_dump.sql';
header(sprintf($disposition, date('Ymd')));
$command = 'mysqldump %s -u"%s" -p"%s"';
passthru(sprintf($command, "{db_name}", "{user}", "{password}"));
?>
参照:http://c-brains.jp/blog/wsg/14/08/13-150057.php


