<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                ### 對于少量數據采用Excel導入導出 - 導入 ~~~ <form id="importform" class="form-horizontal form" action="" method="post" enctype="multipart/form-data"> <div class="form-group"> <label class="col-sm-2 control-label must">EXCEL</label> <div class="col-sm-5" style="padding-right:0;" > <input type="file" name="excelfile" class="form-control" /> <span class="help-block">選擇excel文件</span> </div> </div> <div class='form-group'> <div class="col-sm-12"> <div class="modal-footer"> <button type="submit" class="btn btn-primary" name="cancelsend" value="yes">確認導入</button> </div> </div> </div> </form> ~~~ php處理 ~~~ if ($_W['ispost']) { $rows = m('excel')->import('excelfile'); $time = time(); foreach ($rows as $rownum => $col) { $data = array( 'uniacid' => $_W['uniacid'], 'createtime' => $time, 'category' => trim($col[0]), 'orderid' => trim($col[1]), 'isuse' => trim($col[2]) ); if (empty($col[0])) { continue; } pdo_insert('ewei',$data); } $this->message('導入成功!',webUrl(''), ''); } ~~~ - 導出模板,調用以下方法即可 ~~~ public function import() { $columns = array(); $columns[] = array('title' => '物流類別', 'field' => '', 'width' => 32); $columns[] = array('title' => '物流單號', 'field' => '', 'width' => 32); $columns[] = array('title' => '是否使用', 'field' => '', 'width' => 32); m('excel')->temp('文件名'. date('Y-m-d-H-i', time()), $columns); } ~~~ - 導出excel ~~~ <button type="submit" name="export_order" value="1" class="btn btn-primary btn-sm">導出訂單</button> //$list是數據 if ($_GPC['export_order'] == 1) { $earr = array(); foreach($list as $v){ $earr[]=array( 'openid' => $v['openid'], 'price' => $v['price'], 'mobile'=> $v['mobile'], ); } $titlearr = array( array('title' => 'openid', 'field' => 'openid', 'width' => 24), array('title' => '手機號', 'field' => 'mobile', 'width' => 12), array('title' => '智慧卡金額', 'field' => 'price', 'width' => 12), ); m('excel')->export($earr, array('title' => '訂單-' . date('Y-m-d-H-i', time()), 'columns' => $titlearr)); } ~~~ ### 大數據導入導出 #### csv導出大數據使用方法fputcsv()函數; #### 步驟如下 - 計算出總數據數,大概測試出每次可導出數據量,比如1000條可導出,內存不會溢出;并設置初始導出;下面語句都是需要的,輸出緩存,并且保證不會中文亂碼 ~~~ $totalcount = pdo_fetchcolumn("select count(id) from ".tablename('ewei_shop_order').' where uniacid='.$uniacid); $pagecount = 1000; set_time_limit(0); header("Content-type:application/vnd.ms-excel"); header("Content-Disposition:attachment;filename=全部訂單-".date('Y-m-d-H-i-s').".csv"); ob_start(); ob_end_clean(); echo "\xEF\xBB\xBF"; $head = array('openid','粉絲昵稱'); $fp = fopen('php://output', 'a'); fputcsv($fp, $head); for($i=0;$i<intval($totalcount/$pagecount)+1;$i++){ $sql=""; $sql .= ' LIMIT ' . strval($i*$pagecount) . ',' . $pagecount; $list = pdo_fetchall($sql); foreach($list as &$row){ $export = array($row['openid'],$row['nickname']); fputcsv($fp, $export); } unset($row); } ~~~ 支付通知文件,返回如下信息,ewei_shopv2\payment\wechat\notify.php 通過 $this->get['attach']獲取 ~~~ Array ( [get] => Array ( [appid] => wx8a86306dcc35b538 [attach] => 5:17 //前者為公眾號id,后者是支付方式代碼 [bank_type] => CFT [cash_fee] => 1 [device_info] => ewei_shopv2 [fee_type] => CNY [is_subscribe] => Y [mch_id] => 1485040312 [nonce_str] => d1l11eOETpaY5AeRwC1E18e4T388O14o [openid] => o2SfSwZusX6_wKAFOBGrBAiUpPNk [out_trade_no] => OS20171128143422642364 [result_code] => SUCCESS [return_code] => SUCCESS [sign] => 5B1B86703788788B021E51ED5D667E74 [time_end] => 20171128143428 [total_fee] => 1 [trade_type] => JSAPI [transaction_id] => 4200000042201711287611180681 ) [type] => 17 [total_fee] => 0.01 [set] => [setting] => [sec] => [sign] => [isapp] => [is_jie] => ) ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看