1. 程式人生 > >TP3 VS TP5區別【個人總結】

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+