[PHP] CodeIgniter and Doctrine →→→→→进入此内容的聊天室

来自 , 2021-03-19, 写在 PHP, 查看 119 次.
URL http://www.code666.cn/view/f0204e1d
  1. <?php
  2. // system/application/controllers/hello.php
  3.  
  4. class Hello extends Controller {
  5.  
  6.         function world() {
  7.                 echo "Hello CodeIgniter!";
  8.         }
  9.  
  10.         function user_test() {
  11.  
  12.                 $u = new User;
  13.                 $u->username = 'johndoe';
  14.                 $u->password = 'secret';
  15.                 $u->first_name = 'John';
  16.                 $u->last_name = 'Doe';
  17.                 $u->save();
  18.  
  19.                 $u2 = new User;
  20.                 $u2->username = 'phprocks';
  21.                 $u2->password = 'mypass';
  22.                 $u2->first_name = 'Codeigniter';
  23.                 $u2->last_name = 'Doctrine';
  24.                 $u2->save();
  25.  
  26.                 echo "added 2 users";
  27.         }
  28.  
  29. }
  30.  

回复 "CodeIgniter and Doctrine"

这儿你可以回复上面这条便签

captcha