mysql - Download automatically a file(.sql) in wwwroot using PHP -
so far here i've tried can download sql file empty
//test.php <?php header("content-type: application/octet-stream"); header('content-disposition: attachment; filename=wordpress_db1.sql'); ?>
here root folder like
i want download wordpress_db1.sql file when run test.php empty on it. how can prepare this? thanks!
setting headers doesn't read file. can name file want in attachment. have emit file:
readfile('wordpress_db1.sql');
php mysql
No comments:
Post a Comment