我的页面中有三个按钮,每个按钮是用
header("Cache-Control:private");
header("Content-Type: application/octet-stream");
header("Accept-Ranges: bytes"); header("Accept-Length:" . $filesize); header("Content-Disposition: attachment;filename=download.txt");
header("Pragma: no-cache");
header("Expires: 0");但是当我点第一按钮保存完文件,在点下一个按钮,页面有错。
header("Cache-Control:private");
header("Content-Type: application/octet-stream");
header("Accept-Ranges: bytes"); header("Accept-Length:" . $filesize); header("Content-Disposition: attachment;filename=download.txt");
header("Pragma: no-cache");
header("Expires: 0");但是当我点第一按钮保存完文件,在点下一个按钮,页面有错。
header("Accept-Ranges:bytes");
header("Accept-Length:".filesize($filename));
header("Content-Disposition: attachment;filename=".basename($filename));
header("Cache-Control:private");
header("Content-Type: application/octet-stream");
header("Accept-Ranges: bytes");
header("Accept-Length:" . $filesize);
header("Content-Disposition: attachment;filename=download.txt");
header("Pragma: no-cache");
header("Expires: 0");但是当我点a按钮download完文件,在点b按钮,页面有错,不能download文件。
为什么要做三个按钮?
<input type=button name=down id=down value='b' onClick='b();'>
<input type=button name=down id=down value='c' onClick='c();'>
function a()
{
document.form.Comfirm.value = 1;
document.form.submit();
}