I want to create a backup from a database, but I get only a blank file.
include(\'config.php\'); $command = \"mysqldump --opt -h \".$_host.\" -u \".$_user.\
You should remove the space between the -p and the password.
--opt isn't needed with recent versions of mysql.
--opt
Other than that, your syntax is correct so if it doesn't work with the -p fix, you should check the parameters and the produced command.