关于php中filesize的一个奇怪的现象,求解答。 本帖最后由 abcfyk 于 2012-06-04 02:29:00 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Example #1 Forcing a download using readfile()<?php$file = 'monkey.gif';if (file_exists($file)) { header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename='.basename($file)); header('Content-Transfer-Encoding: binary'); header('Expires: 0'); header('Cache-Control: must-revalidate'); header('Pragma: public'); header('Content-Length: ' . filesize($file)); ob_clean(); flush(); readfile($file); exit;}?> 关于php获取变量问题 彩票复式拆分算法 关于关闭标签 php如何连接oracle 关于php与word通信的问题 求一个正则,谢谢! 关于$_FILES的问题 100分问个PHP用SMTP发邮件的解决方案 关于cookie的详细问题 这个正则表达式写法对吗? 求教!php的SoapClient问题,webservice的地址从ip地址改为域名后报错了 php如何统计下载次数?
Example #1 Forcing a download using readfile()<?php
$file = 'monkey.gif';if (file_exists($file)) {
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename='.basename($file));
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
header('Content-Length: ' . filesize($file));
ob_clean();
flush();
readfile($file);
exit;
}
?>