I follow this and it working well in Window
But when i run in ubuntu (13.10) and using xampp
<?php
$server = "localhost";
$username = "root";
$password = "root";
$db = "test";
$restore_file = "/home/myname/test.sql";
$cmd = "/opt/lampp/bin/mysql -h {$server} -u {$username} -p{$password} {$db} < $restore_file";
//umask(0);
exec($cmd);
echo "Restore complete!";
?>
it echo restore complete but database is empty. If i run script on terminal then it working.
How to fix that thanks