欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

PHP输出excel文件实例代码_PHP教程

程序员文章站 2022-04-15 12:00:57
...
PHP输出excel文件实例代码
  1. header("Content-type:application/vnd.ms-excel");
  2. header("Content-Disposition:attachment;filename=users.xls" );
  3. echo "公司名称"." ";
  4. echo "用户名"." ";
  5. echo "密码"." ";
  6. echo "二级域名"." ";
  7. echo " ";
  8. foreach($result[result] as $val){
  9. echo "$val->ComName"." ";
  10. echo "$val->UserName"." ";
  11. echo "$val->UserTruePw"." ";
  12. echo emptyempty($val->DoMainName)?:(http://.$val->DoMainName..jiaomai.com)." ";
  13. echo " ";
  14. }
  15. ?>

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/486142.htmlTechArticlePHP输出excel文件实例代码 ?php header("Content-type:application/vnd.ms-excel"); header("Content-Disposition:attachment;filename=users.xls" ); echo "公司名称".""; echo "用...