excel 导出

admin1年前Laravel684
    header("Content-Type: application/vnd.ms-excel; name='excel'"); header("Content-Disposition:attachment;filename=" . date('Y-m-d', time()) . "商品订单.xls"); echo <<< EOT <html xmlns:o="urn:schemas-microsoft-com:office:office"  xmlns:x="urn:schemas-microsoft-com:office:excel"  xmlns="http://www.w3.org/TR/REC-html40"> <head><meta http-equiv="Content-type" content="text/html;charset=utf-8" /></head> <body>  <table border="1" width="80%">  <tr>  <td align="center">档口</td>  <td align="center">商品</td>  <td align="center">下单时间</td>  <td align="center">导出时间</td>  </tr> EOT; foreach ($list as $row) { echo <<< EOT  <tr>  <td align="center">{$row["title"]}</td>  <td align="center">{$row["data"]}</td>  <td align="center">{$row["date"]}</td>  <td align="center">{$row["time"]}</td>  </tr> EOT;
        } echo <<< EOT </table> </body> </html> EOT;

相关文章

编辑用户信息

*/public function useredit(){    $avatar = request()->input('avatar');   &...

公众号登录

public function wxlogin(){       $code = request()->input('code'); &n...

生成二维码

public function qrcode($uid){    require_once base_path() . '/public/phpqrcode/phpqrco...

验证手机号

public function phone($phone){    $pat = '/'        . '^13...

获取微信的Token

 public function Token()    {        $this->path = __DIR__ . &...

不重复 的推荐码

public function getcode(){    do {        $code = rand(10000000, 99999...