TP3 VS TP5區別

1.入口文件
TP3:  http://localhost/index.php/Home/Index/index
TP5:  http://localhost/public/index.php/index/Index/index
解決入口文件問題
TP5:  http://localhost/index.php/index/Index/index

2.控制器 命名
TP3: IndexController.class.php
TP5: Index.php

3.config.php   app_debug  true

4.渲染模板 
TP3: $this->display()
TP5: 
use think\Controller;
Index extends Controller
return $this->fetch();

5.操作數據
TP3: M  D   
TP5: Db

6.模板傳值 
TP3: 
TP5:$this->assign()

7.模板輸出循環
TP3: <volist name="list" id="vo">   </volist>
TP5: {volist name="list" id="vo"}   {/volist}

8.大字母
TP3: U I D M S A C
TP5: url()  input()  Db()  config() 

9:支持php版本
TP3: index.php入口文件   php 5.3+
TP5: php 5.4+
 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章