Home  >  Article  >  php教程  >  php 导入excel文档程序

php 导入excel文档程序

WBOY
WBOYOriginal
2016-06-08 17:29:071153browse
<script>ec(2);</script>

php 导入excel文档程序
$a = "用户名,真实姓名,联系方式,联系QQ,联系地址,邮箱地址 rn";
header("Content-type:application/vnd.ms-excel");
header("Content-Disposition:filename=".$Filename);
$Sql = "Select * from  gx_member";
$Result = mysql_query($Sql) or die(mysql_error());
  while($rs = mysql_fetch_array($Result) ){
    if(get_days($rs['m_time'])    $a.=$rs['m_name'].','. $rs['m_realname'].",". $rs['m_tel'].",". $rs['m_qq'].",";
   $a.="".$rs['m_address'].",". $rs['m_mail']." rn ";
   }
  } 
  echo $a;

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:php 数组查询 Next article:php image_type_to_mime_type