Implementation Method: download.php?code ..}index.html?code ..}test.xls effect: a new window is displayed before the File Download box appears. When the download box appears, the new window is automatically closed. Question 1: What is the principle of this effect, why does the window automatically close? Question 2: Such as... implementation method:
Download. php
$outputFileName = "test.xls";header("Content-Type: application/force-download");header("Content-Type: application/octet-stream");header("Content-Type: application/download");header('Content-Disposition:inline;filename="' . $outputFileName . '"');header("Content-Transfer-Encoding: binary");header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");header("Cache-Control: must-revalidate, post-check=0, pre-check=0");header("Pragma: no-cache");
Index.html