上一页 1 ··· 7 8 9 10 11 12 13 下一页
摘要: 1 input数组 如下一个表单: 我们在name属性值后面加一个中括号[],后台获取数据的时候,就能拿到一个数组:$_POST['username'] = ['Jason', 'Tom', 'Goe']。 改用GET方式再提交,可以看到数据格式是这样的: 其中,%5B%5D就是中括号[],代表数组 阅读全文
posted @ 2018-09-08 12:03 254980080 阅读(10034) 评论(1) 推荐(0) 编辑
摘要: Controller类的validate方法验证 validata目录下定义一个验证器类,如:Login 控制器中的validate方法验证 阅读全文
posted @ 2018-08-30 10:23 254980080 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 找到config的template.php 改tpl_replace_string里面的内容,贴回去保存 需要清空模板编译缓存才能生效:runtime-->temp里边 阅读全文
posted @ 2018-08-29 09:17 254980080 阅读(143) 评论(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 阅读(343) 评论(0) 推荐(0) 编辑
摘要: class Index { public function index() { return '欢迎来到PHP中文网'; } public function demo() { // $res = Staff::get(1); // $where = function ($query) { // ... 阅读全文
posted @ 2018-08-06 15:44 254980080 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 正常情况下: 搜索后分页了,点击第二页,进入页面之前的搜索条件没有了. 如代码 $keywords=$this->request->param('keywords'); $this->view->assign('keywords',$keywords); //查询文章 标题 关键字 描述 $bloc 阅读全文
posted @ 2018-07-25 19:35 254980080 阅读(3003) 评论(0) 推荐(0) 编辑
摘要: lashes:斜线 stripslashes:去掉斜线 argument:参数 construct:构造 destruct:析构(销毁) extends:继承 access:访问 variable:变量 constant:常量 convert:转换 interface:接口 implements:实 阅读全文
posted @ 2018-06-28 18:17 254980080 阅读(176) 评论(0) 推荐(0) 编辑
摘要: get请求的接收 输出结果: async/await await必须放在async中 async:异步方法,await:接收异步方法返回的值(异步方法返回的值是:Promise异步对象) promise对象的使用 阅读全文
posted @ 2018-06-21 14:00 254980080 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 启用服务:Mongod 启用服务:Mongod 需要建立data/db文件夹 链接服务:mongo 查看已有数据库:show dbs 使用数据库:use admin 显示数据库中的集合:show collections 查看数据库版本:db.version() 输出:console.log prin 阅读全文
posted @ 2018-06-17 11:36 254980080 阅读(105) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 下一页