I need to download a .xls
file that is in a MySQL database, but I need to save it with the original name.
Can anyone help me?
Uploading with you can be easy. I need to download it.
include_once 'db.php';
$download = mysql_query("SELECT formResolucao FROM tbconfiguracoes");
$nome = mysql_result($download, 0, "nome");
$tipo = mysql_result($download, 0, "tipo");
$conteudo = mysql_result($download, 0, "conteudo");
header('Content-Type: text/html; charset=utf-8');
header('Content-Type: filesize($conteudo)');
header('Content-Type: $tipo');
header("Content-Disposition: attachment; filename=$nome");