public static function send($phone, $message) { if (!self::checkPhoneNumber($phone)) { return false; } $config = CONFIG('sms'); $sms = new ext_smsluosimao($config); try { $sms->send($phone, $message); return true; } catch (sms_Exception $ex) { log::writeLog($ex->message(), 'sms'); return false; } }
/** 记录log * @param String $msg 要记录的log讯息 */ private function to_log($msg) { log::writeLog($msg, 'images_class', log::IMPORTANT); }