在 model / controller 上需注意的地方:

application 的目錄使用內建常數 APPPATH 後面接的路徑不用加 /

ex: APPPATH . 'views/base_layout.php';

system 的目錄使用內建常數 BASEPATH 後面接的路徑不用加 /

ex: BASEPATH.'fonts/texb.ttf';

 

在 views 上需注意的地方:

使用到 assets 靜態路徑使用 url helper 的 base_url();

ex: base_url('assets/img/test.jpg');

在 RESTful 使用 url helper 的 site_url();

ex: site_url('email/send');

產生 <a> 標籤使用 anchor();

ex: anchor('news/local/123', 'My News', array('title' => 'The best news!'));

 

其他在環境變數上需注意的地方:

1. index.php: $system_path 和 $application_folder - 路徑

2. config/config.php: $config['base_url'] - 路徑

3. config/database.php - 資料庫環境參數

4. Rewrite(.htaccess) - 路徑

arrow
arrow
    全站熱搜

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