0
이 코드를 사용하여 서버 측에서 MySQL 데이터베이스를 다운로드하면 제대로 작동하지만 클라이언트 측에서 데이터베이스를 다운로드하는 방법을 모르면 도움을 받으십시오.클라이언트 측 MySQL 데이터베이스 다운로드
include'connect.php';
if(isset($_POST['download'])){
$time = time();
$current_date_time = date('[email protected]', strtotime('+3 hours'));
$backupFile = 'D://xampp//htdocs//development//ShahrajeTraders//backup//'.$database.'~'.$current_date_time.'.sql';
$command = "D://xampp//mysql//bin//mysqldump.exe -h $host_name -u $user_name -p$user_pass $database > $backupFile";
system($command);
if($command){
echo'
<script>
$(document).ready(function(){
alert("Download Completed.");
});
</script>
';
}else{
echo'
<script>
$(document).ready(function(){
alert("Error During Downloading.");
});
</script>
';
}
}
파일을 열고 사용자에게 데이터를 스트리밍하기 만하면됩니까? – Sumurai8
중복 된 btw : http://stackoverflow.com/questions/737045/send-a-file-to-client – Sumurai8