下载方式:
1.去官网
2.git
git clone git://github.com/kohana/kohana.git mykohana
cd mykohana/
git submodule init
git submodule update
首先编辑 bootstrap 文件。查找 bootstrap 文件中的 Kohana::init 这一行,并且在下面增加 index_file 参数:
Kohana::init(array(
'base_url' => '/blog', // 如果你需要的话,你要编辑这个!
'index_file'=>FALSE,//index.php这种显示去除
));
你还需要在 .htaccess 文件中改变一行。
重命名 example.htaccess 文件为 .htaccess 并且更改下面这行代码:
RewriteBase /kohana/
修改为和 bootstrap 文件中的 base_url 一样。如果你的 Kohana 安装在如 example.com/blog/ 的位置,那么就修改为:
RewriteBase /blog/
检修#1
如果无法工作(出现“interval Server Error” 或者 “No inputFile Specified”)请尝试修改:
RewriteRule^(?:application|modules|system)\b - [F,L]
为
RewriteRule^(application|modules|system)/ - [F,L]
还有修改
RewriteRule.* index.php/$0 [PT]
为
RewriteRule.* index.php [L]
检修#2
如果仍然无法正常使用,请确定 .htaccess 文件是否在 httpd.conf ,或者在extra/文件夹config中被允许启用(然后重启 Apache)
<Directory"/var/www/html/example.com/blog">
Order allow,deny
Allow from all
AllowOverride All
</Directory>
kohana自己是没有带分页类的,但是网上有很多教程,自己找找
http://www.phpddt.com/mvc/kohana-pagination.html这篇文章就有