随笔分类 -  web

摘要:商品分类,使用无限分类 即: 如何创建数据表 pid 父级分类id,如果是顶级分类则为0 path 1,用户分类的排序 。 排序示例: 实现逻辑:获取type表的所有分类,order by path , 得到了type列表,然后path有几个逗号就加几个 , 这样,父级分类下就是子级分类,子级分类下 阅读全文
posted @ 2018-09-05 17:11 cl94 阅读(2849) 评论(0) 推荐(0)
摘要:需要生成 SELECT * FROM `goods` WHERE ( `goodstype_id` = 2 or `goodstype_id` = 3 ) $where['goodstype_id'] = [ ['=','3'], ['=',4] ,'or']; Goods::where($wher 阅读全文
posted @ 2018-09-05 16:47 cl94 阅读(6350) 评论(0) 推荐(0)
摘要:html前台文件,上传到控制器,thinkphp处理它 前台 后台 阅读全文
posted @ 2018-09-05 16:39 cl94 阅读(472) 评论(0) 推荐(0)
摘要:thinkphp 验证器一般是验证表单,验证通过就执行操作,不通过就通过json返回错误信息。比一个个验证正则很方便 阅读全文
posted @ 2018-09-05 16:36 cl94 阅读(286) 评论(0) 推荐(0)
摘要:Document 你的cookie: 某篇微博id: 功能: 操作多少次: GOGOGO ... 阅读全文
posted @ 2018-08-31 20:47 cl94 阅读(169) 评论(0) 推荐(0)
摘要:写入日志 爬虫curl //一行行读取文件 阅读全文
posted @ 2018-08-30 17:23 cl94 阅读(127) 评论(0) 推荐(0)
摘要:单行: CSS 多行: CSS 阅读全文
posted @ 2018-08-24 20:31 cl94 阅读(620) 评论(0) 推荐(0)
摘要:模板 后台 阅读全文
posted @ 2018-08-24 13:05 cl94 阅读(437) 评论(0) 推荐(0)
摘要:<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css"> <script src="https://code.jquery.com/jquery-3.3.1.min.js" 阅读全文
posted @ 2018-08-10 08:51 cl94 阅读(374) 评论(0) 推荐(0)
摘要:商城数据表设计 php think make:model index/userphp think make:model index/adminphp think make:model index/goodsTypephp think make:model index/goodsphp think m 阅读全文
posted @ 2018-08-08 18:27 cl94 阅读(226) 评论(0) 推荐(0)
摘要:轻松签到 输入贴吧的COOKIE: 一键签到 Cookie错误,程序停止!'; ob_flush(); flush(); }else{ echo '登陆成功!u like:'.count($tiebaData).'。签到开始!';... 阅读全文
posted @ 2018-08-08 11:09 cl94 阅读(306) 评论(0) 推荐(0)
摘要:轻松下载 输入贴吧帖子的url: Submit \s+(.+?)\\/'; }else{ $preg = '/class\=\"d_post_content\s+j_d_post_content\s+\"\>\s+(.+?)\\/';... 阅读全文
posted @ 2018-08-07 10:08 cl94 阅读(1066) 评论(0) 推荐(0)
摘要:关于curl的优秀文章 php curl cookie 存取示例(标准采集程序)及伪装 https://blog.csdn.net/e421083458/article/details/19326893 PHP cURL应用实现模拟登录与采集使用方法详解 http://www.cnblogs.com 阅读全文
posted @ 2018-08-06 18:36 cl94 阅读(1050) 评论(0) 推荐(0)
摘要:%s 0 "); //XML的发送图片模板 define("IMAGETPL", " ... 阅读全文
posted @ 2018-07-09 17:14 cl94 阅读(1267) 评论(0) 推荐(0)
摘要://php返回json echo json_encode($data); //php将返回的json转换成数组 json_decode($data,true); 阅读全文
posted @ 2018-07-08 22:49 cl94 阅读(338) 评论(0) 推荐(0)
摘要:微信自动回复模板 回复图片模板 阅读全文
posted @ 2018-07-08 22:42 cl94 阅读(204) 评论(0) 推荐(0)
摘要:thinkphp分页非常简单 1,控制器渲染数据: $studentList = StudentDb::paginate(5); $this->view->assign('list',$studentList); 2,模板运用bootstrap的样式 <link rel="stylesheet" h 阅读全文
posted @ 2018-07-05 16:27 cl94 阅读(147) 评论(0) 推荐(0)
摘要:$.get("{:url('admin/admin_del')}",{id:id}); $('#submit').on('click',function(){ $.ajax({ type:"POST", url:"{:url('admin/editcl')}", data:$("form").ser 阅读全文
posted @ 2018-07-05 15:53 cl94 阅读(120) 评论(0) 推荐(0)
摘要:volist标签(用于模板中的数组循环输出) //length:循环多少次 {volist name='list' id='vo' length='4'} <span>{$vo.name}</span> {/volist} eq标签(如果xx==xx,就执行) {eq name="$Think.se 阅读全文
posted @ 2018-07-05 15:52 cl94 阅读(135) 评论(0) 推荐(0)
摘要:首先:有三个数据表 现在用命令行建立它们的模型 $list = Classs::all(); foreach($list as $key=>$value){ $list[$key]['student'] 学生(一个班级对应学生多个) $list[$key]['teacher'] 老师(一个班级对应学 阅读全文
posted @ 2018-07-05 15:37 cl94 阅读(512) 评论(0) 推荐(0)