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

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                ``` <?php function curlPut($destUrl, $sourceFileDir, $headerArr = array(), $timeout = 10) { $ch = curl_init(); //初始化curl curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); //返回字符串,而不直接輸出 curl_setopt($ch, CURLOPT_URL, $destUrl); //設置put到的url curl_setopt($ch, CURLOPT_HTTPHEADER, $headerArr); curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); //不驗證對等證書 curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); //不檢查服務器SSL證書 curl_setopt($ch, CURLOPT_PUT, true); //設置為PUT請求 curl_setopt($ch, CURLOPT_INFILE, fopen($sourceFileDir, 'rb')); //設置資源句柄 curl_setopt($ch, CURLOPT_INFILESIZE, filesize($sourceFileDir)); $response = curl_exec($ch); if ($error = curl_error($ch)) { $bkArr = array( 'code' => 0, 'msg' => $error, ); } else { $bkArr = array( 'code' => 1, 'msg' => 'ok', 'resp' => $response, ); } curl_close($ch); // 關閉 cURL 釋放資源 return $bkArr; } $destUrl = 'http://www.songjm.com/http_put_save.php'; $sourceFileDir = 'asset/pic.png'; $headerArr = array( 'filename:newname.png', ); $bkJson = curlPut($destUrl, $sourceFileDir, $headerArr); $bkArr = json_decode($bkJson, true); echo "<pre>"; print_r($bkArr); die; ``` 接收端: ``` <?php if ($_SERVER['REQUEST_METHOD'] != 'PUT') { $bkMsg = array( 'code' => -1, 'msg' => 'not put', ); echo json_encode($bkMsg); exit(); } $filename = $_SERVER['HTTP_FILENAME']; $fileSaveDir = 'upload/'; $newFile = $fileSaveDir.$filename; $handleToSave = fopen($newFile,'wb+'); $handleSource = fopen('php://input','rb'); while (!feof($handleSource)) { fwrite($handleToSave, fread($handleSource, 1024)); } fclose($handleToSave); fclose($handleSource); $bkMsg = array( 'code' => 1, 'msg' => 'ok', ); echo json_encode($bkMsg); exit(); ```
                  <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>

                              哎呀哎呀视频在线观看