databasedownload.php
- Code: Select all
<?php
header("Content-type: application/octet-stream");
header("Content-disposition: attachment; filename=db_app");
readfile("database/db_app");
?>
When I try to download the file from a usual webbrowser everything is fine.
But when I try to download it from within my Android App I only get a file with a "0" in it and not the real content.
I use the source code from here.
http://www.helloandroid.com/tutorials/how-download-fileimage-url-your-device
I think the problem is that I am not directly downloading the file, instead I have to react on the HTTP Header information "Content-disposition: attachment; filename=db_app", does anyone know how to do this and download the file?

