CodeIgniter 預設控制器(Controllers)為 Welcome,如下圖在 URL 輸入 http://Domain/ProjectName/。

201304041306    

預設顯示畫面。

201304041215  

欲修改 Controllers 預設值,可在 /application/config/routes.php 檔內,將 $route['default_controller']="welcome" 修改為你的 Controllers,如下範例。

//修改
$route['default_controller'] = "control_C";
$route['404_override'] = '';

/* End of file routes.php */
/* Location: ./application/config/routes.php */

以上修改完後,在執行,同樣在 URL 輸入 http://Domain/ProjectName/。

201304041306

執行後,預設畫面。

201304041254   

以下是 control_C.php 檔。

201304041258      

arrow
arrow

    mitblog 發表在 痞客邦 留言(0) 人氣()