Warning: Cannot modify header information - headers already sent by (output started at /var/www/jonas-eriksen.dk/pic/private/index.php:1) in /var/www/jonas-eriksen.dk/pic/private/index.php on line 215
setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);
}
catch (PDOException $ex){
die("Failed to connect to the database: " . $ex->getMessage());
}
include_once ('../../admin/Class.admin.php');
$admin = new admin($db);
if(!$admin->is_user()){$admin->redirect('../static/401.php');}
else{$dump_output = shell_exec("mysqldump --opt --default-character-set=UTF8 --single-transaction --protocol=TCP -u --user=root --password= --host=localhost skyttelaug > %date:~6,4%-%date:~3,2%-%date:~0,2%-%time:~0,2%-%time:~3,2%-%time:~6,2%_restoresync.sql");
echo $dump_output; /* Your output of the dump command */
echo "Done";}
// $restore_output = shell_exec("mysql -u root -p[Paswordofthedatabase] < restoresync.sql");
// echo $restore_output; /* Your output of the restore command */