【发布时间】:2015-11-04 00:16:44
【问题描述】:
我对 PHP 很陌生,所以我确定我做错了什么,但我的代码非常简单,我似乎看不出是什么导致了超时错误。
index.php
include_once ("./inc/controller/controller.php");
$controller = new controller();
$controller->index();
controller.php
include_once('./inc/class/class.common.php');
class controller {
public function __construct(){
$this->common = new Common; // This Line Causes the Error
echo "Everything Loaded"; // This only executes when above line is gone
}
public function index(){
die("done");
}
}
class.common.php
class Common extends controller{
// I don't even have code in here yet
}
查看我的日志我看到了错误
Class 'controller' not found in /inc/class/class.common.php
为什么找不到控制器。
【问题讨论】:
标签: php model-view-controller controller