kohana3.1學習筆記-起步

我在git上找到了3.1但system裏沒有文件就把3.3的system文件放裏面了,無論怎樣讓咱們開始吧;php

把kohana放在個人wamp裏的kohana31目錄下,而後開啓瀏覽器:git

一切ok,接下來重命名install.php文件或刪除bootstrap

而後localhost:kohan31/index.php/welcome/hello瀏覽器

如何去掉index.phpurl

example.htaccess 重命名爲.htaccess/----------------------spa

並修改其中爲(kohana31爲所在目錄)it

# Installation directory
RewriteBase /
RewriteBase /kohana31/io

bootstrap.php /---------------------------------------------im

在bootstrap.php設置默認路徑和url否則沒法起做用命名

Kohana::init(array(

'base_url'   => '/kohana31/',

));



Route::set('default', '(<controller>(/<action>(/<id>)))')
 ->defaults(array(
  'controller' => 'welcome',
  'action'     => 'index',
 ));

而後咱們就能歡快的訪問

localhost/kohana31/

丟掉index.php了

相關文章
相關標籤/搜索