proba con esto:
Código PHP:
Ver original<?php
$file_name=$_REQUEST['file_name']; //ARCHIVO A DESCARGAR
$file_download_name = $_REQUEST['file_download_name']; //NUEVO NOMBRE DEL ARCHIVO
$file_type = "xlsx"; //EXTENSION DEL ARCHIVO
if($fh = fopen($file_name, "r")){
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("content-Type: application/force-download"); //header("content-Type: application/octet-stream");
header("Content-type: application/". $file_type. "");
header("Content-disposition: attachment; filename=". $file_download_name); header("content-Transfer-Encoding: binary");
echo $file_content;
} else {
echo "error...";
}
?>