public function sends() { $sms = new Sms("http://www.189lt.com:9000/servlet/UserServiceAPI", "can", "654123", 1); $txt = $sms->sendsms("13257089190", "开始咯"); }
protected function Send_sms($phone, $body) { //查询短信配置 $token = $this->_get('token'); if (!$token) { $token = session('token'); } $set = M('sms_set')->where(array('token' => $token))->find(); if ($set['status']) { $sms = new Sms("smsbao", $set['account'], $set['password']); $re = $sms->sendsms($phone, $body); return $re; } }