<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>

                # 附件十一 TP5源碼 上傳文件入庫類源碼 上傳文件及圖片調用方法 核心代碼僅僅兩行 ~~~ $pic = $this->request->file($file_name); Upload::uploadPicture($pic,"",true,$rule); $file = $this->request->file($file_name); Upload::uploadFile($file,"",true,$rule); ~~~ * 上傳圖片 ~~~ public function uploadPicture($file_name = "file") { Config::set(['default_return_type' => 'json',]); if ($this->request->isPost()) { $pic = $this->request->file($file_name); if (isset($pic)) { if (is_array($pic) && !is_object($pic)){ return self::showReturnCodeWithOutData(1054, "只容許單張圖片上傳"); } $rule=[]; return Upload::uploadPicture($pic,"",true,$rule); } else { return self::showReturnCodeWithOutData(1010, "上傳的圖片不存在"); } } else { // dump($this->request); return self::showReturnCodeWithOutData(1002); } } ~~~ * 上傳文件 ~~~ public function uploadFile($file_name = "file") { Config::set(['default_return_type' => 'json',]); if ($this->request->isPost()) { $file = $this->request->file($file_name); if (isset($pic)) { if (is_array($pic) && !is_object($pic)){ return self::showReturnCodeWithOutData(1054, "只容許文件上傳"); } $rule=[]; return Upload::uploadFile($file,"",true,$rule); } else { return self::showReturnCodeWithOutData(1010, "上傳的文件不存在"); } } else { return self::showJsonReturnCodeWithOutData(1002); } } ~~~
                  <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>

                              哎呀哎呀视频在线观看