求帮忙 下载代码怎么写 下载代码怎么写我写的代码下载下来的word文档是乱码,怎么看word文档是什么编码???求指点 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 /** * @author wuq * */ function productDownLoad() { $talent_id = $_GET['talent_id']; $file = $this->mod->getTalent($talent_id); $files = $file[0]['photo_url']; if($files) { $file = './photo/'.$files; 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, post-check=0, pre-check=0'); header('Pragma: public'); header('Content-Length: ' . filesize($file)); ob_clean(); flush(); readfile($file); }else{ $this->success('下载失败[文件不存在 或文件已被损坏]',0,2); } }else{ $this->jsAlert('管理员还没有上传附件!',''); } } ZEND5.5 支持 action 属性吗? 在php得到select 控件(列表控件)选中元素的值怎么得到阿 09年末大散分! html如何在链接中调用php? 关于&的操作符问题 初学xajax 的疑问? PHP_PDO 调用存储过程,返回参数问题 统计文件被“完整”下载的次数,需要具备综合的技术知识,所以我没有办法了 header("Content-type: image/gif");为何不起作用? 关于session在页面之间传值的问题 为什么我下载安装了CHORME,还在CSDN下载了东西,还是没有积分呢。。 两个数组的比较,多维的,输出到表格
* @author wuq
*
*/
function productDownLoad()
{
$talent_id = $_GET['talent_id'];
$file = $this->mod->getTalent($talent_id);
$files = $file[0]['photo_url'];
if($files)
{
$file = './photo/'.$files;
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, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-Length: ' . filesize($file));
ob_clean();
flush();
readfile($file);
}else{
$this->success('下载失败[文件不存在 或文件已被损坏]',0,2);
}
}else{
$this->jsAlert('管理员还没有上传附件!','');
}
}