求帮忙 下载代码怎么写 下载代码怎么写我写的代码下载下来的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('管理员还没有上传附件!',''); } } 请教一个zend studio的问题 最新的新浪PHP面试题(2009.3) 充值类的网站,怎样确保资金安全 大家看看 这样匹配网卡格式的正则有问题么 php的面向对象如何掌握 进着皆有分 很尴尬的配置! 为什么连不上SQL 2000 ???? 谁能谈谈php与web services 请教一个基础问题 echo php_strip_whitespace(__FILE__); 为什么我下载安装了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('管理员还没有上传附件!','');
}
}