<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之旅 廣告
                ## 一、獲取單個用戶的信息 ### 1.接口地址 +++ post:http://www.dakaifa.net/index.php?g=App&m=Users&a=getUserInfo *int:uid=111#說明文字 <<< success { "id": "111", "user_nicename": "張天", "avatar": "http://dakaifa.net/data/upload/avatar/57b683b09d109.jpg" } <<< error +++ ### 2.接口代碼 ``` public function getUserInfo(){ $uid=$_POST['uid']; $user_model=M('Users'); $where="id,user_nicename,avatar"; $rst=$user_model->field($where)->find($uid); $rst['avatar'] = "http://".$_SERVER['SERVER_NAME']."/".C("UPLOADPATH")."avatar/" .$rst['avatar']; echo json_encode($rst); } ``` ## 二、獲取多個用戶的信息 ### 1.接口地址 +++ post:http://www.dakaifa.net/index.php?g=App&m=Users&a=getUserInfos *int:uids=111,112,113#說明文字 <<< success [ { "id": "111", "user_nicename": "張天", "avatar": "http://dakaifa.net/data/upload/avatar/57b683b09d109.jpg" }, { "id": "112", "user_nicename": "張君", "avatar": "http://dakaifa.net/data/upload/avatar/57987d7896cd4.jpg" }, { "id": "113", "user_nicename": "微風", "avatar": "http://dakaifa.net/data/upload/avatar/57b6ad22cb5da.png" } ] <<< error +++ ### 2.接口代碼 ``` public function getUserInfos() { $uids=$_POST['uids']; $arr = explode(",", $uids); $user_model=M('Users'); $where="id,user_nicename,avatar"; foreach ( $arr as $key=> $value) { $rst[$key]=$user_model->field($where)->find($value); $rst[$key]['avatar'] = "http://".$_SERVER['SERVER_NAME']."/".C("UPLOADPATH")."avatar/" .$rst[$key]['avatar']; } echo json_encode($rst); } ```
                  <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>

                              哎呀哎呀视频在线观看