<?php
namespace Home\Controller;
use Think\Controller;
class MsgController extends Controller{
public function AddMsg(){
}
public function EditMsg(){
}
public function DeleteMsg(){
}
//默认方法
public function index(){
$Db=M(‘user‘);
//$result=$Db->query("select * from user");
$data=array(
‘Password‘=>rand(),
‘Time‘=>time(),
‘Username‘=>‘Ulike工作室‘
);
$result=$Db->create($data);
//dump($result);//打印实例化对象
$Db->add();
$this->display();
}
public function ViewMsg(){
}
}
?>
时间: 2024-11-14 05:53:58