以下代码不会引发任何错误,但数据库不会备份新数据;
<?php
include('conn.php');
$dbhost="localhost";
$dbuser="landshop_anitgop";
$dbpass="password";
$source=array("landshop_formdata.sql","landshop_clientdata.sql","landshop_blogs.sql","landshop_counter.sql","landshop_hitems.sql");
$path = '"C:/Program Files/EasyPHP-5.3.8.1/www/Landshoppe/Downloaded Dbs/"';
$mysqldump = '"pathToExe".mysqldump.exe"';
foreach($source as $db) {
$dbsource= $path.$db;
$command = "mysql -u{$dbuser} -p{$dbpass} {$db} < ".$path."backup_{$db}.sql";
system($command,$output);
echo "Backed Up : ".$db." Output [".print_r($output,1)."]<br>";
//system('mysql -u <user> -p<password> dbname < filename.sql');
}
?>
不知道怎么回事。。