简体   繁体   English

Kohana 3.3-找不到类模型

[英]Kohana 3.3 - Class Model not found

The problem isn't really generic as my title says... 正如我的书名所说,这个问题并不是真正的普遍性...

I've worked on Kohana site on local, and just put it online on ovh server. 我在本地的Kohana网站上工作过,只是将其放在ovh服务器上在线。 This site is under a subdomain. 该站点位于子域下。 My connexion to mysql seems to be ok. 我对mysql的连接似乎还可以。

It can't find my models ! 它找不到我的模型! But I can display my views ! 但是我可以发表我的看法! And it worked perfectly on my local. 它在我的本地计算机上工作得很好。

I don't know which way I have to take to find my solution... 我不知道我必须采取哪种方式找到解决方案...

[EDIT] [编辑]

I use the function Kohana::find_file() to try to find the path of my model > nothing. 我使用功能Kohana :: find_file()尝试查找模型的路径>不执行任何操作。 But it works for my views. 但这符合我的观点。

I don't know if you figured this out already, but what solved this problem for me was making all classes references exactly equal to the filename of the file that contains the referred class. 我不知道您是否已经解决了这个问题,但是为我解决了这个问题的原因是使所有类引用完全等于包含所引用类的文件的文件名。 So this reference to the class Controller_Home (Home.php in folder Controller) made from the class Controller_MyFrontend (Myfrontend.php na pasta Controller): 因此,此对类Controller_Home(文件夹Controller中的Home.php)的引用是由类Controller_MyFrontend(Myfrontend.php和Pasta Controller)组成的:

class Controller_Home extends Controller_MinhaFrontend {

Would be change to: 将更改为:

class Controller_Home extends Controller_Minhafrontend {

....or else change the filename from Myfrontend.php to MyFrontend.php ....或者将文件名从Myfrontend.php更改为MyFrontend.php

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM