代码改变世界

composer 安装

2017-12-06 14:07 by 李小茗同学, 145 阅读, 0 推荐, 收藏, 编辑
摘要: 阅读全文

tp 框架的rbac rbac.class.php

2017-12-05 13:41 by 李小茗同学, 617 阅读, 0 推荐, 收藏, 编辑
摘要:<?php// + // | ThinkPHP [ WE CAN DO IT JUST THINK IT ]// + // | Copyright (c) 2009 http://thinkphp.cn All rights reserved.// + // | Licensed ( http:// 阅读全文

根据权限显示菜单

2017-11-28 15:19 by 李小茗同学, 808 阅读, 0 推荐, 收藏, 编辑
摘要:<?phpnamespace Admin\Controller;use Think\Controller;class CommonController extends Controller{ function __construct(){ parent::__construct(); $user=s 阅读全文

密码输入三次锁住

2017-11-28 15:16 by 李小茗同学, 263 阅读, 0 推荐, 收藏, 编辑
摘要://登录验证 function doLogin() { $username = I('username'); $pwd = I('pwd'); //$where = array('username' => $username, 'pwd' => $pwd); $res = M('admin')->w 阅读全文

html 页面 点击浏览器返回时,刷新页面

2017-11-27 16:40 by 李小茗同学, 2764 阅读, 0 推荐, 收藏, 编辑
摘要:<script>if(window.name!="hasLoad"){ location.reload(); window.name = "hasLoad"; }else{ window.name=""; } </script> 阅读全文

全选 ajajx

2017-11-27 14:33 by 李小茗同学, 230 阅读, 0 推荐, 收藏, 编辑
摘要://全选function selectAll() { if ($('.gwc_all').is(':checked')) { $(".all").attr("checked", true); //全部选中 } else { $(".all").attr("checked", false);//全部取 阅读全文

ajajx 搜索加分页

2017-11-24 17:01 by 李小茗同学, 127 阅读, 0 推荐, 收藏, 编辑
摘要:<!DOCTYPE html><html><head> <title>搜索加分页</title></head><body> <div id="box"> 时间<input type="text" name="stime" class="stime" style="width:50px">-<inpu 阅读全文

封装分页

2017-11-23 17:50 by 李小茗同学, 188 阅读, 0 推荐, 收藏, 编辑
摘要:tp 框架 放在ThinkPHP/Library/org/util/ <?php// author wenl namespace Org\Util; class Page{ public $page = 1; //当前页 public $page_num =3; //每页显示条数 public $c 阅读全文

Laravel 框架

2017-11-17 16:40 by 李小茗同学, 169 阅读, 0 推荐, 收藏, 编辑
摘要:一、Controller 之request 接值方式 use Illuminate\Http\Request; public function index(Request $requests){ } 1、接旨 $requests->has('名字');接单个值。判断是否存在 $requests->a 阅读全文

tp5

2017-11-17 16:39 by 李小茗同学, 194 阅读, 0 推荐, 收藏, 编辑
摘要:一、接值方式 use think\Request; $request = Request::instance(); $data = $request->param();二、查询出来的数据转换成数组 $res = new User(); $res = $res->find(); $res = coll 阅读全文