Controller.php这样
<?php
include_once 'model.php';
class Controller {
public $model;
public function __construct()
{
$this->model = new Model();
}
public function invoke()
{
//my code
}
?>
我把model.php放在模型中但是当我尝试localhost:8888 / innoshop /时,我得到了这样的错误:
Message: include_once(model.php): failed to open stream: No such file or directory
Message: include_once(): Failed opening 'model.php' for inclusion (include_path='.:/Applications/MAMP/bin/php/php5.5.14/lib/php')