function send($mob, $cid, $par) { $post = ['uid' => $this->uid, 'pas' => $this->pas, 'mob' => $mob, 'cid' => $cid, 'type' => 'json']; $i = 1; foreach ($par as $p) { $post['p' . $i++] = $p; } $rst = curl::requestJson("http://api.weimi.cc/2/sms/send.html", flase, $post); if ($rst['code'] < 0) { throw new \Exception($rst['msg']); } return $rst; }