我有以下代码:
$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");
该文件确实在“上传”目录中,但我无法在这行代码中正确链接它:header('Content-Disposition: attachment; filename="uploads/'.$excel_file.'"');
关于如何设置路径以下载正确文件的任何想法?
谢谢。