A small example of an XLS file generated by PHP

Source: Internet
Author: User
  1. Include '. /.. /inc/auth.php ';

  2. Include '. /public/base.php ';
  3. Include '. /public/boonlist.php ';
  4. The above is the code of the PDO connection database, we do it by ourselves.
  5. Header (' Cache-control:no-cache, Must-revalidate ');
  6. Header (' Content-type:application/vnd.ms-excel ');
  7. Header (' Content-disposition:filename=leavemessage.xls ');
  8. ?>
  9. if (Isset ($_get[' Trio ')) && $_get[' trio ']== ' Trio_message ') {
  10. Echo
  11. Echo
  12. Echo
  13. Echo
  14. Echo
  15. Echo '
  16. }
  17. Echo '
  18. $sql = "SELECT * from Trio_message";
  19. $order _list = $db->getall ($sql);

  20. for ($i =0; $i<>

  21. }
  22. ?>
  23. '; '; '; '; '; '; ';
    Message ID Userid User name Message content Date
    '. $order _list[$i] [id]. ''. $order _list[$i] ["userid"]. ''. $order _list[$i] ["user_name"]. ''. $order _list[$i] [content]. ''. $order _list[$i] ["fdate"]. '
Copy Code
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.