我想将备份文件复制到我的数据库然后恢复它。 我可以创建备份文件,但我无法恢复它我不知道为什么 这是恢复代码
$file=$_GET['restore'];
// echo($file);
//echo $file;
$tableNames = "";
$fileRollback = file_get_contents($file);
$rollBackQuery = explode("\n\n\n", $fileRollback);
echo $fileRollback;
//echo $fileRollback;
// $res = $con2->query($fileRollback);
$result = mysqli_multi_query($con2, $fileRollback);//or
die(mysqli_error($con2));
if($result)
echo('<div class="alert-box success"><span>Success: </span>backup file
successfully restored.</div>');
else echo('<div class="alert-box error"><span>error: </span>Faild restore
backup file .</div>');