PHP 导入EXCEL文件

$filename = 'hehe.xls';
header ('Content-type: text/html; charset=UTF-8');
header ( "Content-type:application/vnd.ms-excel; charset=UTF-8");
header ( "Content-Type: application/download" );
header ( "Content-Disposition:filename=$filename" );

echo "一\t";
echo "\n";

$result['province'] = '嘿嘿1';
$result['city'] = '嘿嘿2';
$result['postcode'] = '嘿嘿3';

foreach($result as $k=>$v){
    echo "$v\t\n";
}

posted @ 2014-07-24 15:48  tlijian1989  阅读(164)  评论(0编辑  收藏  举报