namespace app\admin\model;
use think\Model;
use think\Session;
class User extends Model{
//获取用户
public function getUser(){
echo "<pre>";
var_dump($this->select());
echo "</pre>";
}
}
//结果
array(8) {
[0]=>
ob
["connection":protected]=>
array(0) {
}
["name":protected]=>
string(4) "User"
["table":protected]=>
NULL
["class":protected]=>
string(20) "app\admin\model\User"
["error":protected]=>
NULL
["validate":protected]=>
NULL
["pk":protected]=>
NULL
["field":protected]=>
array(0) {
}
["readonly":protected]=>
array(0) {
}
["visible":protected]=>
array(0) {
}
["hidden":protected]=>
array(0) {
}
["append":protected]=>
array(0) {
}
["data":protected]=>
array(9) {
["id"]=>
int(22)
["user"]=>
string(4) "houn"
["name"]=>
string(0) ""
["password"]=>
string(32) "65b50b04a6af50bb2f174db30a8c6dad"
["note"]=>
string(0) ""
["pid"]=>
int(0)
["company"]=>
string(0) ""
["address"]=>
string(0) ""
["tel"]=>
int(0)
}
最佳答案
