摘要: <?php namespace Home\Controller; use Think\Controller; class LoginController extends Controller{ public function login(){ //显示页面,实现登录 if(empty($_POST) 阅读全文
posted @ 2018-03-15 10:29 palpitate 阅读(198) 评论(0) 推荐(0) 编辑
摘要: <?php namespace Home\Controller; use Think\Controller; class IndexController extends Controller { public function index(){ $s = "hello"; $this->assign 阅读全文
posted @ 2018-03-15 10:27 palpitate 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 链接数据库 首先写配置文件 复制concentration.php中的 /* 数据库设置 */ 'DB_TYPE' => '', // 数据库类型 'DB_HOST' => '', // 服务器地址 'DB_NAME' => '', // 数据库名 'DB_USER' => '', // 用户名 ' 阅读全文
posted @ 2018-03-15 08:57 palpitate 阅读(99) 评论(0) 推荐(0) 编辑
摘要: namespace Home\Controller; 命名空间 根命名空间下的类所在的文件夹use Think\Controller; 使用 根命名空间下的controller类 顶头写写在php后面不加任何空格及代码 命名空间:虚拟目录目的:自动加载类初始命名空间:Library(公用的,为了保证 阅读全文
posted @ 2018-03-15 08:53 palpitate 阅读(124) 评论(0) 推荐(0) 编辑
摘要: Thinkphp 框架2 一、打开控制类文件 —————————— <?php namespace Home\Controller; use Think\Controller; class IndexController extends Controller { public function in 阅读全文
posted @ 2018-03-15 08:48 palpitate 阅读(195) 评论(0) 推荐(0) 编辑
摘要: Thinkphp 框架 Thinkphp中的Library中的配置不要改动 核心函数库存主要函数; 配置文件; 语言包 ; 核心资源库;入口文件 核心配置文件 系统行为目录;功能目录;核心文件;摸板类文件目录 核心函数库存主要函数; 配置文件; 语言包 ; 核心资源库;入口文件 核心配置文件 系统行 阅读全文
posted @ 2018-03-15 08:32 palpitate 阅读(113) 评论(0) 推荐(0) 编辑