转存数据
//简历下载方法
public function actiondlresume(){
//数据查询
$id = i(get.id);
$where['company_id'] = $id;
$re = m(company)->where($where)->select();
// print_r($re);die;
$html ='
姓名
'.$re['u_name'].'
性别
'.$re['g_sex'].'
学历
'.$re['school_type'].'
工作时间
'.$re['work_year'].'
毕业
学校
'.$re['g_school'].'
所在
城市
'.$re['city_name'].'
联系邮箱
'.$re['work_email'].'
联系
电话
'.$re['work_phone'].'
当前
状态
'.$re['work_type'].'
教育
背景
'.$re['edutation'].'
工作
经历
'.$re['g_workj'].'
作品
展示
'.$re['g_zuo'].'
';
// print_r($html);die;
// $word->start();
ob_start();
echo xmlns:w='urn:schemas-microsoft-com:office:word'
xmlns='http://www.w3.org/tr/rec-html40'>;
echo $html;
echo ;
// $word->save($filename);
$data = ob_get_contents();
// print_r($data);die;
// die;
ob_end_clean();
$filename = $re['u_name'].'.doc';
$fp=fopen($filename,wb);
fwrite($fp,$data);
fclose($fp);
//文件的类型
header('content-type: application/word');
header(content-disposition: attachment; filename=.$filename);
readfile($filename);
ob_flush();
flush();
exit();
}
ad:真正免费,域名+虚机+企业邮箱=0元