I have the following code:
$objWriter = new PHPExcel_Writer_Excel2007($excel);
$objWriter->save("uploads/".$excel_file);
header('Content-type: application/vnd.ms-excel');
header('Content-Disposition: attachment; filename="uploads/'.$excel_file.'"');
header("Pragma: no-cache");
header("Expires: 0");
The file is indeed in the "uploads" directory, but I fail to link it correctly in this line of code: header('Content-Disposition: attachment; filename="uploads/'.$excel_file.'"');
Any idea about how should I set the path in order to download the correct file?
Thanks.