Posted by vesakilp on 09/10/06 12:15
I've got this problem: I'm trying to backup a table from my database to
a .sql file. I'm running mysqldump command from php file, and the
result file is empty. Where's the problem?
Code:
<?php
include "settings.inc";
include "db.php";
global $dbase;
global $duser;
global $dpass;
DBConnect();
$backup = "mysqldump -h localhost -u $duser -p $dpass $dbase table_name
> backup/table_name.sql";
shell_exec($backup);
DBClose();
?>
Navigation:
[Reply to this message]
|