以下是我现在的总代码。我已经逃脱了反斜杠并做了所有我认为应该正确的事情。
<?php
include('conn.php');
mysql_select_db("landshop_formdata");
$dbname="landshop_clientdata";
$dbhost="localhost";
$dbuser="landshop_anitgop";
$dbpass="password";
//$root = realpath($_SERVER["DOCUMENT_ROOT"]);
$backupFile =$dbname.".sql";
echo $backupFile."<br><br>";
//$dmp="C:\\Program Files\\EasyPHP-5.3.8.1\\mysql\\bin\\mysqldump.exe";
//$command = "$dmp --OPT -h$dbhost -u$dbuser -p$dbpass $dbname > $backupFile";
//system($command);
$dmp = '"C:\Program Files\EasyPHP-5.3.8.1\mysql\bin\mysqldump.exe"';
$command = $dmp
. ' --opt -h '.$dbhost.' -u "'. $dbuser. '" -p "'. $dbpass.'" '. $dbname.' > "'. $backupFile. '"';
system($command);
?>
它仍在生成 0kb 文件!怎么了 ?!我已经尝试了所有选项!