<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之旅 廣告
                ## 常規安裝 常駐內存模式、協程模式的 HTTP 開發都使用該方法安裝。 ## 環境要求 >[success] 必須的 - PHP 版本 >= 7.0 - Swoole >= 1.9.5 (常駐同步模式) - Swoole >= 4.2.2 (常駐協程模式) - mbstring 擴展 >[success] 可選的 - Composer (修改一級目錄,安裝第三方庫需要) - gd 擴展 (Image組件需要) - pdo 擴展 (Pdo組件需要) - redis 擴展 (Redis組件需要) ## 環境搭建 ### 1. 安裝 Swoole 擴展 pecl 在 php/bin 目錄,國內 pecl 安裝 swoole 有時很慢,如果無法忍受,可選擇 [編譯安裝](https://wiki.swoole.com/wiki/page/6.html)。 ~~~shell $> pecl install swoole ~~~ ### 2. 安裝 MixPHP 使用 [composer](https://www.phpcomposer.com/) 安裝,但是一般情況下,`composer` 安裝的是最新的穩定版本,不一定是最新版本。 ```shell composer create-project mixstart/mixphp --prefer-dist ``` 如果你需要安裝實時更新的版本: ```shell composer create-project mixstart/mixphp=v1.1.1 --prefer-dist ``` 入口文件安裝至 `/usr/local/bin`,(可選,不安裝可直接執行入口文件)。 ```shell $> cd /data/mixphp-master $> chmod 777 install.sh $> ./install.sh ``` ### 3. 確認安裝成功 啟動 mix-httpd 服務器。 >[info] - 請使用 root 賬號啟動 mix-httpd。 > - 初次部署建議不使用 `-d` 參數,這樣能方便發現目錄權限不足,路徑不對等系統級錯誤問題。 ~~~shell $> mix-httpd service start -d ~~~ 訪問測試: ~~~shell $> curl http://127.0.0.1:9501/ Hello World ~~~ 如果顯示 "Hello World" 的歡迎語那就表示 MixPHP 已經正常運行。 ### 4. 增加 Nginx 反向代理 ~~~shell server { server_name www.test.com; listen 80; root /data/mixphp/apps/httpd/public; location / { proxy_http_version 1.1; proxy_set_header Connection "keep-alive"; proxy_set_header Host $http_host; proxy_set_header Scheme $scheme; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; if (!-f $request_filename) { proxy_pass http://127.0.0.1:9501; } } } ~~~ >[info] 在 MixPHP 中通過讀取 Request::header('x-real-ip') 或者 Request::header('x-forwarded-for') 來獲取客戶端的真實IP。 ## Swoole IDE 自動補全 這個不是必須安裝的,只是能方便在需要寫一些原生 Swoole 時,能讓 IDE 自動補全,很方便的一個工具,推薦安裝。 [>> 到 GitHub 下載 swoole-ide-helper-phar <<](https://github.com/mixstart/swoole-ide-helper-phar)
                  <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>

                              哎呀哎呀视频在线观看