前言 从上一篇中已经大致介绍了Hibernate并且有了一个快速入门案例的基础了,-.本博文主要讲解Hibernate API 我们看看快速入门案例的代码用到了什么对象吧,然后一个一个讲解 public static void main(String[] args) { //创建对象 User user = new User(); user.setPassword("123"); user.setCellphone("122222"); user.setUserna
Controller代码: Demo2Controller.class.php <?php namespace Home\Controller; use Think\Controller; use Think\Model; class Demo2Controller extends Controller { //insert 操作 public function test1(){ $Model = new Model(); $sql = "insert into city(cityname
一.跨控制器调用 UserController.class.php <?php namespace Home/Controller use Think/Controller class UserController extends Controller{ public function show(){ //TODO } } IndexController.class.php(方法一) <?php namespace Home/Controller use Think/Controller cl