有人可以教我如何安装php unit以及如何在这样的常规php函数中使用它.....我已经在Youtube和google上进行了搜索,以及大多数安装php unit的方式已过时他们都没有正确教书。我是Windows用户。谢谢!
class Login extends Connection
{
public $id;
public $username;
public $password;
public function getUsername($USERNAME)
{
$this->username=$USERNAME;
}
public function getPassword($PASSWORD)
{
$this->password=$PASSWORD;
}
public function setUsername($USERNAME)
{
$this->username;
}
public function setPassword($PASSWORD)
{
$this->password;
}
public function login1()
{
$query="select * from tbl_user where Username='$this->username' &&
Password='$this->password' ";
$res = mysqli_query($this->conn,$query);
$num = mysqli_num_rows($res); //it counts selected rows in database
if($num==1)
{
echo "logged in";
}
else
{
echo "failed";
}
}
}