Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/298.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php MySQL数据库中的信息录入问题_Php_Mysql_Php 7 - Fatal编程技术网

Php MySQL数据库中的信息录入问题

Php MySQL数据库中的信息录入问题,php,mysql,php-7,Php,Mysql,Php 7,我试图在DB on production模式中引入一些数据信息,但不起作用我正在使用PDO连接到DB,在我的localhost中工作正常,但在GoDaddy服务器中工作不正常 我使用的是MVC,当我提交数据时,我通过POST发送数据,在控制器中是这样的 当我提交时,我执行这个 $Registro=新的ControlAdorUsarios(); $Registro->ctrRegistroUsuario(); 静态公共函数ctrRegistroUsuario(){ 如果(isset($_POS

我试图在DB on production模式中引入一些数据信息,但不起作用我正在使用PDO连接到DB,在我的localhost中工作正常,但在GoDaddy服务器中工作不正常

我使用的是MVC,当我提交数据时,我通过POST发送数据,在控制器中是这样的

当我提交时,我执行这个


$Registro=新的ControlAdorUsarios();
$Registro->ctrRegistroUsuario();
静态公共函数ctrRegistroUsuario(){ 如果(isset($_POST[“regUsuario”])){ 如果(预匹配('/^[a-zA-Z0-9ñññáíóúÁÍÓÚ]+$/',美元后[“规则”])&& 预赛('/^[^0-9][a-zA-Z0-9.]+([.][a-zA-Z0-9.]+)*[@][a-zA-Z0-9.]+([.][a-zA-Z0-9.]*[.][a-zA-Z]{2,4}$/,$POST[“regEmail”])&& 预匹配('/^[a-z0-9][a-z0-9.]+$/',$POST[“regPassword”])){ $encriptar=crypt($_POST[“regPassword”],“//hash”); $encriptarEmail=md5($_POST[“regEmail”]); $datos=数组( “usuario”=>strtolower($_POST[“regUsuario”]), “email”=>strtolower($_POST[“regEmail”]), “密码”=>$encriptar, “nombre”=>strtolower($_POST[“regNombre”]), “apellidos”=>strtolower($_POST[“regApellido”]), “telefono”=>$\u POST[“regTelefono”], “验证”=>$encriptarEmail ); $tabla=“usuario”; $respuesta=ModeloUsuarios::mdlRegistrousario($tabla,$datos); 如果($respuesta==“确定”){ /*=================================================================== =我在这里发送一个确认邮件帐户= ===================================================================*/ $envio=$mail->Send(); 如果(!$envio){ 回声“错误”; }否则{ 呼应"成功",; } }否则{ 回声“错误2”; } } } } 当我提交时,错误会转到error2,在我的模型中,我有

公共静态函数mdlRegistrousario($tabla,$datos){
$stmt=Conexion::conectar()->prepare(“插入$tabla(通常是,电子邮件,密码,nombre,apellidos,telefono,verificacion)值(:通常是,:email,:password,:nombre,:apellidos,:telefono,:verificacion)”;
$stmt->bindParam(“:usuario”,$datos[“usuario”],PDO::PARAM_STR);
$stmt->bindParam(“:email”、$datos[“email”]、PDO::PARAM_STR);
$stmt->bindParam(“:password”、$datos[“password”]、PDO::PARAM_STR);
$stmt->bindParam(“:nombre”,$datos[“nombre”],PDO::PARAM_STR);
$stmt->bindParam(“:apellidos”,$datos[“apellidos”],PDO::PARAM_STR);
$stmt->bindParam(“:telefono”,$datos[“telefono”],PDO::PARAM_STR);
$stmt->bindParam(“:verificacion”,$datos[“verificacion”],PDO::PARAM_STR);
如果($stmt->execute()){
返回“ok”;
}否则{
返回errorinfo();
}
$stmt->close();
$stmt=null;
}
在我的
错误\u日志中
显示此错误

    #0 route/Controladores/usuarios.controlador.php(33): ModeloUsuarios::mdlRegistroUsuario('usuario', Array)
    #1 route/registro.php(42): ControladorUsuarios::ctrRegistroUsuario()
    #5 {main}
      thrown in route/Modelos/usuarios.modelo.php on line 31

我真的不知道问题出在哪里,希望有人能帮助我

你在这里发布的是错误的stacktrace,在那之前你应该有一条错误消息,你能把它添加到问题中吗?@catcon很抱歉,它没有打印出另一个错误,这就是为什么我不能理解错误,更不用说知道它是什么了,
CtrRegistruuario
被标记为
静态方法,但您调用它就像调用实例方法一样