10 八月, 2006 00:14
通过发送http实现,假设$filesize代表文件大小,$filename代表文件名,文件内容为filecontent
header("Content-type: application/octet-stream"); //文件类型的mimetype
header("Accept-Ranges: bytes"); //如果不需要显示文件尺寸可省略
header("Accept-Length: ".$filesize); //同上
header("Content-Disposition: attachment; filename=" . $filename);
echo $filecontent;
这样就可以隐藏文件的实际路径,比如保存在数据库中的文件等。
header("Content-type: application/octet-stream"); //文件类型的mimetype
header("Accept-Ranges: bytes"); //如果不需要显示文件尺寸可省略
header("Accept-Length: ".$filesize); //同上
header("Content-Disposition: attachment; filename=" . $filename);
echo $filecontent;
这样就可以隐藏文件的实际路径,比如保存在数据库中的文件等。





30/10/2007, 05:56
wtfwbrkg http://dgajouva.com fhhhkxdp zmzjhxbn
30/10/2007, 05:06
duykjtno http://vyciwmro.com cdcypfew ujjfbktf
30/10/2007, 03:35
fgvbcqyg http://czjebmqo.com kszgowxd jaijtmem
29/10/2007, 19:27
Nothing is particularly hard if you divide it into small jobs.
29/10/2007, 16:05
There is still a difference between something and nothing, but it is purely geometrical and there is nothing behind the geometry.
29/10/2007, 16:05
There is still a difference between something and nothing, but it is purely geometrical and there is nothing behind the geometry.
29/10/2007, 12:44
I'm going to stay in show business until I'm the last one left.
29/10/2007, 09:22
When we lose one we love, our bitterest tears are called forth by the memory of hours when we loved not enough.
29/10/2007, 06:01
It's the opinion of some that crops could be grown on the moon. Which raises the fear that it may not be long before we're paying somebody not to.
29/10/2007, 02:25
The people I distrust most are those who want to improve our lives but have only one course of action.
28/10/2007, 22:58
Nothing can be so amusingly arrogant as a young man who has just discovered an old idea and thinks it is his own.
28/10/2007, 19:27
The fact that an opinion has been widely held is no evidence whatever that it is not utterly absurd; indeed in view of the silliness of the majority of mankind, a widespread belief is more likely to be foolish than sensible.
28/10/2007, 16:07
All human situations have their inconveniences. We feel those of the present but neither see nor feel those of the future; and hence we often make troublesome changes without amendment, and frequently for the worse.
28/10/2007, 12:46
There is a great deal of difference between an eager man who wants to read a book and the tired man who wants a book to read.
28/10/2007, 08:58
Even the best of friends need time apart.
28/10/2007, 05:15
He who will not reason is a bigot; he who cannot is a fool; and he who dares not is a slave.
28/10/2007, 01:27
Shake off all the fears of servile prejudices, under which weak minds are servilely crouched. Fix reason firmly in her seat, and call on her tribunal for every fact, every opinion. Question with boldness even the existence of a God; because, if there be one, he must more approve of the homage of reason than that of blindfolded fear.
27/10/2007, 22:19
It's not the hours you put in your work that counts, it's the work you put in the hours.
27/10/2007, 19:10
The problem with people who have no vices is that generally you can be pretty sure they're going to have some pretty annoying virtues.
27/10/2007, 15:19
I was the kid next door's imaginary friend.