public class User { private String username; private String password; public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void
<?php class Ajax{ //ajax调用的方法 //sql是要执行的语句 //$type是SQL语句的类型,0代表增删改,1代表查询 //$db代表要操作的数据 public function Ajax($sql,$type=1,$db="lian1") { //造连接对象 $conn = new mysqli($this->host,$this->uid,$this->pwd,$db); //判断连接是否成功 !mysqli_connect_err