<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、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                # swoole_http_client->addFile 添加POST文件。 ```php function swoole_http_client->addFile(string $path, string $name, string $filename = null, string $mimeType = null, int $offset = 0, int $length = 0) ``` * $path 文件的路徑,必選參數,不能為空文件或者不存在的文件 * $name 表單的名稱,必選參數,FILES參數中的key * $filename 文件名稱,可選參數,默認為`basename($path)` * $mimeType 文件的MIME格式,可選參數,底層會根據文件的擴展名自動推斷 * $offset 上傳文件的偏移量,可以指定從文件的中間部分開始傳輸數據。此特性可用于支持斷點續傳。 * $length 發送數據的尺寸,默認為整個文件的尺寸 使用`addFile`會自動將POST的`Content-Type`將變更為`form-data`。`addFile`底層基于`sendfile`,可支持異步發送超大文件。 > addFile在1.8.9或更高版本可用 > $offset, $length 參數在1.9.11或更高版本可用 使用示例 ---- ```php <?php $cli = new swoole_http_client('127.0.0.1', 80); //post request $cli->setHeaders(['User-Agent' => "swoole"]); $cli->addFile(__DIR__.'/post.data', 'post'); $cli->addFile(dirname(__DIR__).'/test.jpg', 'debug'); $cli->post('/dump2.php', array("xxx" => 'abc', 'x2' => 'rango'), function ($cli) { echo $cli->body; }); ```
                  <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>

                              哎呀哎呀视频在线观看