会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
254980080
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
7
8
9
10
11
12
13
下一页
2018年9月8日
表单中input name属性有无[]的区别
摘要: 1 input数组 如下一个表单: 我们在name属性值后面加一个中括号[],后台获取数据的时候,就能拿到一个数组:$_POST['username'] = ['Jason', 'Tom', 'Goe']。 改用GET方式再提交,可以看到数据格式是这样的: 其中,%5B%5D就是中括号[],代表数组
阅读全文
posted @ 2018-09-08 12:03 254980080
阅读(10129)
评论(1)
推荐(0)
2018年8月30日
验证器
摘要: Controller类的validate方法验证 validata目录下定义一个验证器类,如:Login 控制器中的validate方法验证
阅读全文
posted @ 2018-08-30 10:23 254980080
阅读(210)
评论(0)
推荐(0)
2018年8月29日
模板输出替换
摘要: 找到config的template.php 改tpl_replace_string里面的内容,贴回去保存 需要清空模板编译缓存才能生效:runtime-->temp里边
阅读全文
posted @ 2018-08-29 09:17 254980080
阅读(153)
评论(0)
推荐(0)
模型中的数据操作
摘要: Model Controller //数据库操作 1、数据库方法:User::where()->update()、User::insert() 等返回影响的记录条数 int(0),不能自动写入时间戳 2、模型动态方法:$model=new User(); $model->save() 等返回布尔值,
阅读全文
posted @ 2018-08-29 09:10 254980080
阅读(355)
评论(0)
推荐(0)
2018年8月6日
模型的CURD操作
摘要: class Index { public function index() { return '欢迎来到PHP中文网'; } public function demo() { // $res = Staff::get(1); // $where = function ($query) { // ...
阅读全文
posted @ 2018-08-06 15:44 254980080
阅读(131)
评论(0)
推荐(0)
2018年7月29日
魔术方法之__call与__callStatic方法
摘要: say(1, 2, 3); /* __call是调用不可见(不存在或无权限)的方法时,自动调用 $li->say(1, 2, 3); -----没有say()方法----> __call('say', array(1, 2, 3))运行 */ human::cry('痛哭', '鬼哭', '号哭'); /* __callStatic 是调用不可见的静态方法时,自动调用. Human::c...
阅读全文
posted @ 2018-07-29 10:19 254980080
阅读(191)
评论(0)
推荐(0)
2018年7月25日
thinkphp5 实现搜索分页能下一页保留搜索条件
摘要: 正常情况下: 搜索后分页了,点击第二页,进入页面之前的搜索条件没有了. 如代码 $keywords=$this->request->param('keywords'); $this->view->assign('keywords',$keywords); //查询文章 标题 关键字 描述 $bloc
阅读全文
posted @ 2018-07-25 19:35 254980080
阅读(3040)
评论(0)
推荐(0)
2018年6月28日
php
摘要: lashes:斜线 stripslashes:去掉斜线 argument:参数 construct:构造 destruct:析构(销毁) extends:继承 access:访问 variable:变量 constant:常量 convert:转换 interface:接口 implements:实
阅读全文
posted @ 2018-06-28 18:17 254980080
阅读(182)
评论(0)
推荐(0)
2018年6月21日
koa2
摘要: get请求的接收 输出结果: async/await await必须放在async中 async:异步方法,await:接收异步方法返回的值(异步方法返回的值是:Promise异步对象) promise对象的使用
阅读全文
posted @ 2018-06-21 14:00 254980080
阅读(164)
评论(0)
推荐(0)
2018年6月17日
mongodb
摘要: 启用服务:Mongod 启用服务:Mongod 需要建立data/db文件夹 链接服务:mongo 查看已有数据库:show dbs 使用数据库:use admin 显示数据库中的集合:show collections 查看数据库版本:db.version() 输出:console.log prin
阅读全文
posted @ 2018-06-17 11:36 254980080
阅读(112)
评论(0)
推荐(0)
上一页
1
···
7
8
9
10
11
12
13
下一页
公告