[英]php file working in localhost server but not in cpanel
if($_SERVER['REQUEST_METHOD']=='POST'){
//this is my database //这是我的数据库
include 'db.php';
$con = mysqli_connect($servername,$username,$password,$dbname);
//inputs //输入
$email = $_POST['email'];
$password = $_POST['password'];
$phone = $_POST['phone'];
//checking query //检查查询
$Sql_Query = "select * from user_info where email = '$email' and password = '$password' and phone = '$phone' ";
$check = mysqli_fetch_array(mysqli_query($con,$Sql_Query));
if(isset($check)){
echo "Data Matched";
}
else{
echo "Invalid combination of Username or Phone and Password ! Please Try Again";
}
}else{
echo "Check Again";
}
//closing //结束
mysqli_close($con);
what is the error, please help me out I'm stuck 错误是什么,请帮我解决
Please set the root path to include. 请设置要包含的根路径。
<?php include('db.php'); ?>
Your issue may be resolved. 您的问题可能已解决。
If the issue is only on server , the following might help you: 如果问题仅在server上,则以下内容可能对您有帮助:
echo 123;exit;
echo 123;exit;
调试 , and find where the code breaks.. Hope this helps you. 希望这对您有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.