摘要: 1 class File 2 { 3 private $_dir; 4 const EXT = '.txt'; 5 6 public function __construct() 7 { 8 $this->_dir = dirname(__FILE__).'/files'; 9 } 10 11 publ... 阅读全文
posted @ 2019-05-24 00:56 yach_yu 阅读(696) 评论(0) 推荐(0) 编辑
摘要: 一、HTML 二、JS 说明:需要引入layui中的table和laytpl模板引擎,laytpl可以自定义事件及自定义数据字段等 三、PHP 阅读全文
posted @ 2019-04-25 14:27 yach_yu 阅读(6770) 评论(0) 推荐(0) 编辑
摘要: 实现效果 1、菜单管理 2、角色管理 3、用户管理 Mysql表设计: 原理: 如:安全下面有【用户管理】、【角色管理】、【表彰-菜单管理】3个子菜单 阅读全文
posted @ 2019-04-15 11:46 yach_yu 阅读(1707) 评论(0) 推荐(0) 编辑
摘要: 要求:多个子表数据格式需一致 阅读全文
posted @ 2019-04-14 23:53 yach_yu 阅读(19904) 评论(1) 推荐(1) 编辑
摘要: const 修饰类属性 1 class Person 2 { 3 const HOST = 'localhost'; 4 5 public function say(){ 6 echo 'hello'; 7 } 8 } 9 10 echo Person::HOST; final 最终版本,不允许被继承:修饰类或方法 1 f... 阅读全文
posted @ 2019-04-14 23:40 yach_yu 阅读(461) 评论(0) 推荐(0) 编辑
摘要: __construct 构造方法 1 class Person 2 { 3 public $name; 4 5 # 构造方法 6 public function __construct($n){ 7 $this->name = $n; 8 } 9 10 public function say(){ 11 ... 阅读全文
posted @ 2019-04-14 23:29 yach_yu 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 抽象类:含有抽象方法的类【abstract 抽象关键词】 1 abstract class Usb 2 { 3 public function load(){ 4 echo "Usb is loading"; 5 } 6 7 public function start(){ 8 echo "Usb is starting... 阅读全文
posted @ 2019-04-14 22:35 yach_yu 阅读(490) 评论(0) 推荐(0) 编辑
摘要: 对象链原理 1 class Person 2 { 3 public function find(){ 4 echo 'find'; 5 return $this; 6 } 7 public function attr(){ 8 echo 'attr'; 9 return $this; 10... 阅读全文
posted @ 2019-04-14 22:15 yach_yu 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 普通索引 添加索引:alter table t1 add index idx_name(name);删除索引:alter table t1 drop index idx_name; 唯一索引 添加索引:alter table t1 add unique uni_name(name);删除索引:alter table t1 drop index uni_name; 阅读全文
posted @ 2019-04-14 21:59 yach_yu 阅读(935) 评论(0) 推荐(0) 编辑
摘要: 字段添加 添加sex字段: alter table t1 add sex tinyint not null;在name字段后面添加sex字段: alter table t1 add sex tinyint not null after name;在第一列添加sex字段 alter table t1 add sex tinyint not null first; 字段删除 a... 阅读全文
posted @ 2019-04-14 21:53 yach_yu 阅读(347) 评论(0) 推荐(0) 编辑