Home  >  Article  >  Backend Development  >  PHP output excel file example code_PHP tutorial

PHP output excel file example code_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 17:41:151003browse

PHP output excel file example code

  1. header("Content-type:application/vnd.ms-excel") ;
  2. header("Content-Disposition:attachment;filename=users.xls" );
  3. echo "Company name"." ";
  4. echo "Username" ." ";  
  5. echo "Password"." "; ";
  6. foreach($result[result] as $val){
  7. echo "$val->ComName"."; >UserName"." ";
  8. echo "$val->UserTruePw"." ";
  9. echo emptyempty($val->DoMainName)?:(http:// .$val->DoMainName..jiaomai.com)." ";
  10. echo " "; 
  11. ?>
http://www.bkjia.com/PHPjc/486142.html
www.bkjia.com

true

TechArticlePHP output excel file example code?php header("Content-type:application/vnd.ms-excel") ; header("Content-Disposition:attachment;filename=users.xls" ); echo "Company name".""; echo "Use...
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