ecmall倒出会员邮件地址

2013-09-12 00:10 来源:www.chinab4c.com 作者:ecamll专家

    ecmall倒出会员邮件地址,这个插件非常重要,我们在运营了一段时间的项目之后,需要把下单会员的邮件信息统计出来,进行具体的营销和分析,这个是有必要的,我们就可以通过开发ecmall邮件倒出功能,来实现ecmall二次开发这个插件效果。以下是程序。

   $model_order =& m('order');

$email_list  = $model_order->db->getAll("select buyer_email from ".DB_PREFIX."order group by buyer_email");

$fn =  "data/".date("Y-m-d").".xls";

$file = fopen($fn,"w");

foreach ($email_list as $k => $v) {

fputcsv($file,$v);

}

fclose($file);

header ( "Pragma: public" );

header ( "Expires: 0" );

header ( "Cache-Control: must-revalidate, post-check=0, pre-check=0" );

header ( "Content-Type: application/force-download" );

header ( "Content-Type: application/octet-stream" );

header ( "Content-Type: application/download" );

header ( "Content-Disposition: attachment;filename=$filename " );

header ( "Content-Transfer-Encoding: binary " );

header("Location:".$fn);

       以上就是ecmall倒出会员邮件地址开发。

      来源:http://www.chinab4c.com