//user 模型
<?php
namespace app\admin\model;
use think\Model;
class User extends Model{
}
//实例化
public function add(){
echo '<pre>';
var_dump( User::select() );
echo '</pre>';
}
//结果是这样的:::
array(8) {
[0]=>
object(app\admin\model\User)#14 (26) {
["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)
}
帮忙看下谢谢各位 最佳答案
