Ajax调用json封装代码<dbda.php>: //Ajax调用返回JSON public function JsonQuery($sql,$type=1,$db="mydb") { //定义数据源 $dsn = "mysql:dbname={$db};host={$this->host}"; //造pdo对象 $pdo = new PDO($dsn,"{$this->uid}","{$this->pw…
Student st1 = new Student(1, "dg", 18, new Date()); Student st2 = new Student(2, "dg", 18, new Date()); Student st3 = new Student(3, "dg", 18, new Date()); Student st4 = new Student(4, "d…