Ich habe Sicherung erfolgreich, aber jetzt muss ich diese Daten in localhost wiederherstellen j mein Backup-Laufwerk ist C: \ Wamp \ www \ mein Pawning-Projekt \ backup_restore das ist mein Wiederherstellungscode.Wie Backup-Mysql-Datei in PHP wiederherstellen
<?php
include '../Connection/connect.php';
$restore_data = $_GET['restore_data'];//file time
$base="http://localhost/my%20Pawning%20Project/backup_restore/";
$query = "select * from backups where time='$restore_data'";
$result = mysql_query($query);
while ($row = mysql_fetch_array($result)) {
$file_path =$row['file_name'];
}
$sql=file_get_contents($base.$file_path);
mysql_query($sql);
if(mysql_query($sql))
{
/*Success*/
echo "Successfully restored";
}
else
{
/*Fail*/
echo "Error: Fail to Restore";
}
?>
Randnotiz: Sie sollten nicht mysql_ * Funktionen verwenden. Mehr Infos hier: http://stackoverflow.com/questions/12859942/why-shouldnt-i-use-mysql-functions-in-php –