I got this code on this website, but I can't get it working.
$file = 'backups/mytable.sql';
$result = mysql_query("SELECT开发者_高级运维 * INTO OUTFILE '".$file."' FROM ##TABLE##");
I then modified it:
$file = "Backups/mytable.sql";
$result = mysqli_query("SELECT * INTO OUTFILE '".$file."' FROM comments") or die ("Query Died: Exporting");
The query just dies, no PHP error. I am using XAMPP.
Do you have permission to do this?
The priviledge attribute is 'FILE' and it works both ways, reading from and writing to files.
精彩评论