摘要: 表名 注释destoon_404 404 日志 destoon_ad 广告 destoon_ad_place 广告位destoon_admin 管理员destoon_admin_log 管理日志destoon_alert 贸易提醒 destoon_announce 公告destoon_area 地区 阅读全文
posted @ 2018-04-16 16:29 我是谁,我在做什么 阅读(259) 评论(0) 推荐(0)
摘要: $CFG['db_host']数据库服务器,可以包括端口号,一般为localhost$CFG['db_user']数据库用户名,一般为root$CFG['db_pass']数据库密码$CFG['db_name']数据库名称$CFG['db_charset']数据库连接字符集$CFG['databas 阅读全文
posted @ 2018-04-16 11:05 我是谁,我在做什么 阅读(167) 评论(0) 推荐(0)
摘要: halt = (DT_DEBUG || IN_ADMIN) ? 1 : 0; $db->pre = $CFG['tb_pre']; $db->connect($CFG['db_host'], $CFG['db_user'], $CFG['db_pass'], $CFG['db_name'], $CFG['db_expires'], $CFG['db_charset'], $CFG['pcon... 阅读全文
posted @ 2018-04-16 10:53 我是谁,我在做什么 阅读(115) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2018-04-16 00:01 我是谁,我在做什么 阅读(368) 评论(0) 推荐(0)
摘要: 方法 public function index() { $ad = Destoon_ad::get(2); return $ad->totime; } 模型下创建读取器 protected function getTotimeAttr($totime){ return date('Y-m-d',$ 阅读全文
posted @ 2018-04-15 20:56 我是谁,我在做什么 阅读(152) 评论(0) 推荐(0)
摘要: delete()方法 $result = Destoon_ad::get(['aid'=>['=',17]]); dump($result->delete()); destroy()方法 public function index() { $where = function($query){ $qu 阅读全文
posted @ 2018-04-15 20:34 我是谁,我在做什么 阅读(113) 评论(0) 推荐(0)
摘要: public function index() { //模型实列化调用get()和find()方法 $ad = new Destoon_ad; $where = function($query){ $query->field(['pid','url'])->where('aid',1); }; $r 阅读全文
posted @ 2018-04-15 20:06 我是谁,我在做什么 阅读(282) 评论(0) 推荐(0)
摘要: public function index() { $ad = new Destoon_ad(); $data=[ 'url'=>'www.baidu.com', 'pid'=>'6666' ]; $where = ['aid'=>1]; $ad->save($data,$where); dump( 阅读全文
posted @ 2018-04-15 19:26 我是谁,我在做什么 阅读(227) 评论(0) 推荐(0)
摘要: 添加操作 public function index() { //1.实列化模型,创建模型对象 $ad = new Destoon_ad(); //2.创建数据,采用对象方式 $ad->pid = '666'; $ad->url = 'www.666.com'; //3.执行添加操作 $result 阅读全文
posted @ 2018-04-15 18:39 我是谁,我在做什么 阅读(163) 评论(0) 推荐(0)
摘要: 在模块下创建modle文件夹 <?phpnamespace app\index\model;use think\Model; class Destoon_ad extends Model{ //创建模型成功;} 实例化,查询模型 public function index() { $ad = new 阅读全文
posted @ 2018-04-15 18:11 我是谁,我在做什么 阅读(144) 评论(0) 推荐(0)