<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>下载文件</title>
<style type="text/css">
*{
margin: 0 auto;
}
a{
text-decoration: none;
color: black;
}
</style>
</head>
<body>
</html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>下载文件</title>
<style type="text/css">
*{
margin: 0 auto;
}
a{
text-decoration: none;
color: black;
}
</style>
</head>
<body>
<a href="downLog.php?filename=1.txt">下载 </a>
</body></html>
/*
php文件downLog.php
利用header属性
*/
<?php
$fileName = $_