自学PHP,上手比较快,现自学thinkPHPv5。初次接触,很多不懂地方。

Wampserver64集成环境

thinkPHPv5

目的:数据库连接测试

step1:

创建数据库:‘thinkphp_test’

新建table:‘login’

字段:‘id’,‘name’,‘password’,‘tel’

step2:

修改tp的database.php文件:

(文件位置:项目下:.\application\下)

step3:

编写.\application\index\controller\Index.php

step4:

编写.\application\index\view\index\index.html

(注:index.html文件必须放在\view\下的index文件下,不然会找不到文件报错!卡了好久!)

成果图:

 

初学很多不懂!加油!

 

posted on 2018-11-20 17:42  dii233  阅读(693)  评论(0)    收藏  举报