![](https://iknow-base.cdn.bcebos.com/lxb/notice.png)
ucenter java 整合 java程序如何同步登录 50
ucenter和java整合,在java端怎样同步登录和登出。找了半点,都不全,都没说java端该怎么重写uc.php文件。我想知道,如果在论坛或其他应用上登录了,我的j...
ucenter 和java 整合,在java端怎样同步登录和登出。找了半点,都不全,都没说java端该怎么重写
uc.php文件。
我想知道,如果在论坛或其他应用上登录了,我的java端该怎么重写代码。
需要保存到session中么? cookie怎么弄?
有写过的么?发我一份。 展开
uc.php文件。
我想知道,如果在论坛或其他应用上登录了,我的java端该怎么重写代码。
需要保存到session中么? cookie怎么弄?
有写过的么?发我一份。 展开
1个回答
2015-04-08 · 知道合伙人互联网行家
关注
![](https://wyw-base.cdn.bcebos.com/pc-content/follow.gif)
展开全部
Client uc = new Client();
String $returns = uc.uc_user_register(user.getUsername(), "***", user.getEmail());
int $uid = Integer.parseInt($returns);
if ($uid <= 0) {
if ($uid == -1) {
System.out.print("用户名不合法");
} else if ($uid == -2) {
System.out.print("包含要允许注册的词语");
} else if ($uid == -3) {
System.out.print("用户名已经存在");
} else if ($uid == -4) {
System.out.print("Email 格式有误");
} else if ($uid == -5) {
System.out.print("Email 不允许注册");
} else if ($uid == -6) {
System.out.print("该 Email 已经被注册");
} else {
System.out.print("未定义");
}
} else {
System.out.println("OK:" + $returns);
}
String $returns = uc.uc_user_register(user.getUsername(), "***", user.getEmail());
int $uid = Integer.parseInt($returns);
if ($uid <= 0) {
if ($uid == -1) {
System.out.print("用户名不合法");
} else if ($uid == -2) {
System.out.print("包含要允许注册的词语");
} else if ($uid == -3) {
System.out.print("用户名已经存在");
} else if ($uid == -4) {
System.out.print("Email 格式有误");
} else if ($uid == -5) {
System.out.print("Email 不允许注册");
} else if ($uid == -6) {
System.out.print("该 Email 已经被注册");
} else {
System.out.print("未定义");
}
} else {
System.out.println("OK:" + $returns);
}
追问
你这写的是什么东西。。
我问 别的应用登陆,java端如何同步。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询