我有一个用PHP编写的考勤管理系统应用程序。这个包在我的本地机器上工作得很好,但是当我试图在生产服务器上托管它时,主页正在加载,但我无法登录任何用户帐户/数据。
<?php
session_start();
include_once("include'config.php");
if (isset($_POST['textfield1'])&&isset($_POST['textfield2'])){
$login = $_POST["textfield1"];
$pwd = $_POST["textfield2"];
$recordset = mysql_query("select * from users");
while($record = mysql_fetch_array($recordset)){
if($login == $record["ulogin"] && $pwd == $record["upassword"])
{
$_SESSION["ulogin"] = $record["ulogin"];
$_SESSION["uid"] = $record["uid"];
if($record["utype"] == 1){
$_SESSION["utype"] = $record["utype"];
header("Location:admin.php?uid=".$record["uid"]);
exit;
}else{
header("Location:home.php");
exit;
}
}
}
}
header("Location:login.php?invalid=1");
?>
这是我的用户密码验证码基础连接。一切正常。请帮帮我。
确认DB在服务器上。确认配置。一个快速的MYSQL技巧(如果你正在使用它):如果information_schema表显示,那么你的数据库没有正确配置。