1)在eclipse中創建項目case01目錄設置wmp的www目錄之下
2)將ThinkPhp下載下來,解壓,并將文件拷入新建的項目下面,此時,已經可以訪問這個項目了.
http://localhost/case01/
http://localhost/case01/index.php
http://localhost/case01/index.php/Home
http://localhost/case01/index.php/Home/Index
這些路徑都是可以訪問的.
3)我們在eclipse的case01項目的刷新一下,Application下面會新增很多的文件,修改一下Application/Home/Controller下面的IndexController.class.php文件,增加一個:
通過路徑:http://localhost/case01/index.php/Home/Index/test,就可以訪問了.
4)我們也可以模擬IndexController.class.php增加控制器UserController.class.php
訪問:http://localhost/case01/index.php/Home/User
5)創建一個新的管理模塊
在項目的根目錄,復制index.php 至admin.php,修改代碼:
define('APP_PATH','./admin/');
訪問:
http://localhost/case01/admin.php
http://localhost/case01/admin.php/Home
http://localhost/case01/admin.php/Home/Index
http://localhost/case01/admin.php/Home/Index/index
6)修改控制器/admin/Home/Controller/IndexController.class.php,增加:
訪問:http://localhost/case01/admin.php/Home/Index/test
新聞熱點
疑難解答
圖片精選