public function downXlsx($filename){
$file_name =
$filename.
".xlsx";
$file_dir = dirname(
__file__).
"/xls/";
if (!file_exists (
$file_dir.
$file_name)) {
echo "文件找不到";
exit ();
}
else {
header(
"Content-Type: application/force-download");
header(
"Content-Disposition: attachment; filename=".
$this->getXlsName(
$filename).
".xlsx");
readfile(
$file_dir.
$file_name);
}
}
转载请注明原文地址: https://www.6miu.com/read-53345.html