Hi Guys
Im trying to get a database backup using ...
<?php
exec("mysqldump -ulogin -ppassword database > file.sql");
?>
but the resulting file file.sql is written but is empty can anyone suggest where im going wrong plz ??
many thanx
<?php exec("mysqldump database > file.sql"); ?>
Thanx BUT .... <?php
exec("mysqldump database > file.sql");
file.sql = blank :-(
Doesn't database have to be the name of the database?
On my system it was neccessary to use this:
<?php exec("E:\PHP\WAMP\mysql\bin\mysqldump.exe --opt test_database > backup-file.sql"); ?>
in order to get any output into the text file.
not on mine it worked perfectly
Edit ^
works a dream now Guys, Thank you