首页 > 代码库 > thinkphp-模型初步

thinkphp-模型初步

//模型初步

//创建Model基类,传递sks表,think_sks
/*
$user=new Model(‘Sks‘);
echo "<pre>";
var_dump($user->select());
echo "</pre>";
*/

/*
$user=new Model(‘Sks‘,‘think_‘);
echo "<pre>";
var_dump($user->select());
echo "</pre>";
*/

/*
$user=new Model(‘Sks‘,‘think_‘,‘mysql://root:root@localhost/skshui‘);
echo "<pre>";
var_dump($user->select());
echo "</pre>";
*/

/*
$user=M(‘Sks‘);
echo "<pre>";
var_dump($user->select());
echo "</pre>";
*/

/*
$user=new Model(‘Sks‘);
echo "<pre>";
var_dump($user->select());
echo "</pre>";
*/

/*
$user=new SksModel();
echo "<pre>";
var_dump($user->select());
echo "</pre>";
*/

thinkphp-模型初步