问题
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