I am running the following PHP script to take backup of my database but the code is not running as expected and the attend.sql file is not generated
<?php
exec('mysqldump -uroot -prahu attendance > attend.sql', $result);
foreach ($result as $ line)
echo "$line
";
echo "DONE";
?>