<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之旅 廣告
                [TOC] # 第一步:建立`composer.json`文件并寫入引用 新建一個目錄`oss`,在這個目錄下新建一個`composer.json` ![mark](http://qiniu.newthink.cc/blog/20180406-094347042.png) 然后把下邊段文件`copy` ``` { "require": { "aliyuncs/oss-sdk-php": "~2.0" } } ``` # 第二步:`composer install`安裝及修改配置 在這個目錄下,使用`cmd`進行`composer install`安裝,報錯如下: ![mark](http://qiniu.newthink.cc/blog/20180406-091111988.png) 按照網上說明關閉`https`,方法如下 ``` composer config secure-http false ``` 這時我們看到`composer.json`文件變為如下: ``` { "require": { "aliyuncs/oss-sdk-php": "~2.0" }, "config": { "secure-http": false } } ``` # 第三步:`composer install`安裝 安裝過程如下: ![mark](http://qiniu.newthink.cc/blog/20180406-094331496.png) 安裝完畢后,文件夾變為如下格式 ![mark](http://qiniu.newthink.cc/blog/20180406-094316781.png) `vendor`文件夾如下: ![mark](http://qiniu.newthink.cc/blog/20180406-094300228.png) # 第四步:配置`OSS`并使用 新建`app.php`并引入 ![mark](http://qiniu.newthink.cc/blog/20180406-094241584.png) 修改`samples`目錄中的`Config.php`文件 ``` const OSS_ACCESS_ID = 'LTAIQMSN14zhIg3o'; const OSS_ACCESS_KEY = '75wEihzPSWZ6Qfgr93m5WSQrjBMq6B'; const OSS_ENDPOINT = 'http://oss-cn-hangzhou.aliyuncs.com'; const OSS_TEST_BUCKET = 'yanghongwei'; ``` 注意:不能用生產環境的`bucket`,以免污染用戶數據 ![mark](http://qiniu.newthink.cc/blog/20180406-094214239.png) 到`samples`目錄中執行 `php RunAll.php`, 也可以單個運行某個`Sample`文件,如圖所示: ![mark](http://qiniu.newthink.cc/blog/20180406-093343182.png) # 第五步:根據報錯修改時間 ``` RequestTimeTooSkewed: The difference between the request time and the current time is too large. ``` 這個報錯是由于時間大于`15分鐘`——調整到北京時間,多看看幾個表! >一開始我以為我的時間是北京時間,后來仔細看看差著一個多小時! 再運行,結果如下: ![mark](http://qiniu.newthink.cc/blog/20180406-085237481.png) 再運行一次,正確結果如圖所示: ![mark](http://qiniu.newthink.cc/blog/20180406-085651268.png) ![mark](http://qiniu.newthink.cc/blog/20180406-085659554.png) ![mark](http://qiniu.newthink.cc/blog/20180406-085706454.png) ![mark](http://qiniu.newthink.cc/blog/20180406-085713072.png) ![mark](http://qiniu.newthink.cc/blog/20180406-085729634.png) ![mark](http://qiniu.newthink.cc/blog/20180406-085741485.png) 這時我們也可以到后臺看到有這么多的數據,如下所示: ![mark](http://qiniu.newthink.cc/blog/20180406-085836783.png)
                  <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>

                              哎呀哎呀视频在线观看