excel 导出

admin1年前Laravel568
    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 check($content){    $count = 0; //违规词的个数    $list =...

百度浏览器中视频悬浮

  <video class="html5-video"                poster=...

腾讯云发送短信

<?phpnamespace App\Http\Controllers;use Illuminate\Http\Request;use Illuminate\Support\Facades\DB...

关注公众号并登录

/* * 服务端生成带唯一标识二维码并将唯一标识返回给前端 */ public function wx_code() { $scene_str = $this->get_...

用户注册账号

public function register(){    $mobile = request()->input('mobile');   &nb...

阿里云发送短信

public function sms(){    $moile = request()->input('mobile');    if...