Unity3d Unity注册脚本在WebHost上不工作

Unity3d Unity注册脚本在WebHost上不工作,unity3d,Unity3d,我已经使用php脚本在unity上创建了一个登录和注册,我的数据库是mysql。当我使用phpMyAdmin localhost时,它可以正常工作,但当我在000webhost上发布脚本时,它就可以正常工作。我无法通过注册插入数据,我的登录也可以正常工作。请帮忙 不整洁代码 公共类寄存器:单行为 { 公共游戏对象登录; 公共游戏对象用户名; 公开游戏对象电子邮件; 公开游戏对象密码; 公开游戏对象密码; 公共字符串CurrentMenu=“Login”; 公开游戏对象消息; 私有字符串登录;

我已经使用php脚本在unity上创建了一个登录和注册,我的数据库是mysql。当我使用phpMyAdmin localhost时,它可以正常工作,但当我在000webhost上发布脚本时,它就可以正常工作。我无法通过注册插入数据,我的登录也可以正常工作。请帮忙

不整洁代码

公共类寄存器:单行为
{
公共游戏对象登录;
公共游戏对象用户名;
公开游戏对象电子邮件;
公开游戏对象密码;
公开游戏对象密码;
公共字符串CurrentMenu=“Login”;
公开游戏对象消息;
私有字符串登录;
私有字符串用户名;
私人字符串电子邮件;
私有字符串密码;
私有字符串密码;
//私有字符串形式;
private bool EmailValid=false;
私有字符串[]字符={“a”、“b”、“c”、“d”、“e”、“f”、“g”、“h”、“i”,
“j”、“k”、“l”、“m”、“n”、“o”、“p”、“q”、“r”,
“s”、“t”、“u”、“v”、“w”、“x”、“y”、“z”、“A”,
“B”、“C”、“D”、“E”、“F”、“G”、“H”、“I”、“J”、“K”、“L”、“M”、“N”,
“O”、“P”、“Q”、“R”、“S”、“T”、“U”、“V”、“W”、“X”、“Y”、“Z”、“1”,
"2","3","4","5","6","7","8","9","0","_","-"};
私有字符串CreateAccountURL=”https://dbanme.000webhostapp.com/Registeration.php";
//用于初始化
void Start()
{
}
IEnumerator CreateCount()
{
//这就是向php脚本发送消息的原因
WWWForm Form=新WWWForm();
//这些字段是我们发送给php脚本的变量
表格.AddField(“loginas”,loginas);
表单.AddField(“用户名”,用户名);
表格.AddField(“电子邮件”,电子邮件);
表单.AddField(“密码”,Password);
Form.AddField(“ConfPassword”,ConfPassword);
WWW CreateAccountWWW=新WWW(CreateAccountURL,表单);
//等待php将某些内容发送回php
收益率回报率;
字符串响应=CreateAccountWWW.text;
如果(CreateAccountWWW.error!=null)
{
字符串CreateAccountReturn=CreateAccountWWW.text;
if(response.Contains(“failed”))
{
Message.GetComponent().text=响应;
//CurrentMenu=“登录”;
}
}
其他的
{
Message.GetComponent().text=响应;
加载场景(“登录”);
}
}
//每帧调用一次更新
无效更新()
{
if(Input.GetKeyDown(KeyCode.Tab))
{
if(username.GetComponent().isFocused)
{
email.GetComponent().Select();
}
if(email.GetComponent().isFocused)
{
password.GetComponent().Select();
}
if(password.GetComponent().isFocused)
{
confpassword.GetComponent().Select();
}
}
}
公共无效gotologin()
{
加载场景(“登录”);
}
//这是登记簿,刚刚告诉你
公共无效按钮注册表()
{
loginas=loginas.getComponentChildren().text;
if(loginas==“教师”)
{
loginas=“教师”;
//加载场景(“登录”);
}
else if(loginas==“学生”)
{
loginas=“学生”;
//加载场景(“登录”);
}
Username=Username.GetComponent().text;
Email=Email.GetComponent().text;
Password=Password.GetComponent().text;
ConfPassword=ConfPassword.GetComponent().text;
if(Username!=System.String.Empty&&Email!=System.String.Empty&&Password!=System.String.Empty&&ConfPassword!=System.String.Empty)
{
电子邮件验证();
//Start例程(CreateAccount());
}
}
无效电子邮件验证()
{
bool-SW=假;
bool-EW=假;
for(int j=0;j5)
{
PW=真;
}
其他的
{