标签:
跳转到另一个网页实现下载文件
<?php header("location:index.php"); ?>
<?php //index.php $file=‘1.txt‘; //paths $filename=‘someother.txt‘; //download name header("content-type:application/force-download"); header("content-disposition:attachment;filename=".$filename.""); readfile(‘1.txt‘); ?>
标签:
原文地址:http://www.cnblogs.com/wz0107/p/5450783.html