Kohana 3.3 Model not loading on linux, but will on Windows

霸气de小男生 提交于 2019-12-12 03:49:27

问题


So I am struggling migrating to a linux server. I get the error

ErrorException [ Fatal Error ]: Class 'Model_Game' not found

My file structure is

application/classes/Model/game.php

And the model definition is

class Model_Game extends ORM {
    protected $_table_name = 'game';
    protected $_primary_key = 'game_id';

    ...
}

This works in my windows environment, but not in my linux environment. From my understanding this is correct


回答1:


You need to follow PSR-0 naming: http://kohanaframework.org/3.3/guide/kohana/upgrading#psr-0-support-fileclass-naming-conventions and http://kohanaframework.org/3.3/guide/kohana/conventions#class-names-and-file-location




回答2:


You need to change the filename to Game.php (uppercase "G").

Linux filesystems are case sensitive



来源:https://stackoverflow.com/questions/15192434/kohana-3-3-model-not-loading-on-linux-but-will-on-windows

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