thinkphp简单了解

thinkphp安装

  • a)直接下载安装
    直接去thinkphp官网下载http://www.thinkphp.cn/down.html
  • b)用Composer安装
    最好使用composer安装,但是目前我都是用下载安装。以后在学习
  • c)Git安装

thinphp的目录说明

|– application 项目核心操作
|–|– index 项目前台目录
|–|–|– controller 项目前台的控制器
|–|–|– model 项目前台的数据模型
|–|–|– view 项目前台的展示层
|–|– admin 项目后台目录
|– extend 扩展类库,这里是让自己编写类库用的
|– public 这里静态资源和入口文件
|–|– static 这里是放静态资源文件
|–|– index.php 这里是入口文件
|– runtime 这里是临时文件,可以在这里查看编译后的文件
|– think 这个是thinkphp的核心文件
|–|– lang 这个是语言包
|–|– library 这个是核心类库,所用的类就在这个里面
|–|– tpl 这个是系统的模板文件
|– vendor 这个是thinkphp的扩展文件

URL基础学习

http:// -> www.tp.com/ -> index.php/ -> Index/ -> index/ -> index
http协议 -> 域名 -> 入口文件 -> 模块名 -> 控制器名 -> 方法名

简单使用流程

  1. 开启调试 config.php
  2. 链接数据库 database.php
  3. 在index模块里面controller控制器里面编写代码,调用view
  4. 创建view文件,并编写
  5. 访问链接

猜你喜欢

转载自blog.csdn.net/weixin_42249565/article/details/80392865