'错误密码', '40' => '账号不存在', '41' => '余额不足', '43' => "IP地址限制", '50' => "内容含有敏感词", '51' => '手机号码不正确' ]; public static function sendPhoneCode($phone): string { $code = mt_rand(100000, 999999); $password = md5(static::$password); $content = str_replace("{code}", $code, static::$content); $url = static::$uri . "?u=" . static::$username . "&p=" . $password; $url .= "&c=" . urlencode($content); $url .= "&m=" . $phone; $code = file_get_contents($url); if (!empty(static::$errors[$code])) return static::$errors[$code]; if ($code == 0) return '已发送'; return "发送失败"; } }