PHP导出excel表格

<?php
header('Content-Type: application/force-download');
header("Content-type: text/html; charset=utf-8"); 
header('Content-Disposition: attachment; filename=租赁成交记录导出-'.date('y-m-d').'.xls');
echo '<table>
  <tr>
    <td>abc</td>
    <td>123</td>
  </tr>
  <tr>
    <td>qwe</td>
    <td>456</td>
  </tr>
</table>
';
?>

 

posted @ 2015-12-19 22:11  FinnYY  阅读(131)  评论(0编辑  收藏  举报