Code:
<?php
include("common/dbConnection.php");
//I know I don't need to connect
//but the connection has the variables in it that I need
//below ... seemed like an easy way to get them in
//without re-inventing ...
$backupFile = "backups/".$dbName . date("Y-m-d-H-i-s") . '.sql';
$command = "mysqldump --opt -h $dbHostname -u $dbUsername -p $dbPassword $dbName > $backupFile";
system($command);
echo "DOWNLOAD: <a href=\"$backupFile\">$backupFile</a>";
?>
What I wind up with is an empty text file. What am I doing wrong?
MrsBean