Kohana 3.3 Not working from Subdirectory

百般思念 提交于 2019-12-10 11:01:47

问题


Answer:

Kohana 3.3, they didn't take into account case-sensitivity on folders/files (they capitalized some directories/files) so this is going to drive some folks nuts when they start switching to the new Kohana (just like I did).

I switched back to Kohana 3.2 until this has been fixed.


Thank you very much for taking time in reading my huge post I had about this silly problem, and I hope this answer saves a poor souls life in the future =)


回答1:


It is not correct that "they didn't take into account case-sensitivity on folders/files." The change was a conscious decision, as documented in the guide under "Upgrading from v3.2".

Kohana 3.3 adds partial support for the PHP Framework Interop Group's PSR-0 standard. PHP framework developers are encouraged to follow this standard to simplify interaction between frameworks.

One of the requirements of PSR-0 is that the class names and file names match. Previously, Kohana used Title Case class names but lowercase file names. Now, the case of both matches. If you look, you will see that all Kohana class files have been uppercased.

This will not be "fixed" in a future release because the lowercase filenames were "broken" and now they are fixed.

In general, Kohana sometimes introduces breaking changes between versions, but you should always be able to find them in the guide.




回答2:


If I am not wrong, you can work from subdirectory. Just mention it in your application/bootstrap.php file:

Kohana::init(array(
    'base_url' => '/subfolder',
));



回答3:


If yoo try from url /beta/index.php works? for dreamhost I use a differet rewrite rule

#Local
#RewriteRule ^(.*)$ $1.php/$0
#Dreamhost
RewriteRule ^(.*)$ $1.php?/$0 [PT]


来源:https://stackoverflow.com/questions/13121861/kohana-3-3-not-working-from-subdirectory

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!