Kohana autoload不工作

时间:2014-03-04 00:18:44

标签: php kohana

我正在尝试运行此(https://github.com/bertelsmannstift/Beteiligungskompass)项目的工作安装。

在我看来,自动加载工作不正常,因为我收到以下错误:

PHP message: PHP Fatal error:  Class 'Helper_Mobile' not found in
/srv/www/releases/20131205104015/application/classes/controller/base.php
on line 63" while reading upstream, client: 92.239.225.104, 
server: *****, request: "GET / HTTP/1.1", 
upstream: "fastcgi://unix:/var/run/php5-fpm.sock:",

自动加载工作正常。 bootstrap.php

中的这一行
spl_autoload_register(array('Kohana', 'auto_load'));

存在并且删除它会更早地破坏事物。那么为什么Kohana不能在/srv/www/releases/20131205104015/application/classes/helper/mobile.php找到班级?

1 个答案:

答案 0 :(得分:1)

似乎您使用Kohana 3.3来编写3.2或3.1的应用程序。

尝试其他版本或阅读migrating guide

mobile/helper.php使用短开放标记。您是否尝试在php.ini中将short_open_tags设置为true?