//xsl表格的头标题
public function getFieldArray(){
return $FieldArray = array('注册时间','真实姓名','用户名','邮箱',
'固定电话','移动电话','机构','部门',
'职务','性别','地区','地址',
'生日','兴趣爱好','签名','财富','状态'
);
}
//
public function getExcel(){import('ORG.Net.php-excel'); //导入
$data = array();
$data[1] = $this->getFieldArray();//标题 数组的第一位
$result = $this->member->searchMember('','add_time desc','');//获取数据库中的会员信息
foreach($result as $value){ //表格的内容
$data[] = array(
date('Y-m-d',$value['add_time']),$value['u_nick'],$value['u_name'],$value['u_email'],
$value['u_phone'],$value['u_mobile'],$value['u_institution'],$value['u_dep'],
$value['u_business'],$value['u_sex'],$value['u_area'],$value['u_address'],
date('Y-m-d',$value['u_birthday']),$value['u_interest'],$value['u_sign'],$value['u_credits'],$value['status']
);
}
$xls = new Excel_XML('UTF-8', false, 'MEMBER-INFO');//设置编码 和文件名称
$xls->addArray($data);
$xls->generateXML('MEMBER-INFO');
}