[英]Fatal error: Class 'BaseController' not found in C:\xampp\htdocs
i have created a controller menus.php which extends basecontroller as follows 我创建了一个控制器menus.php,它扩展了basecontroller,如下所示
<?php
class Menus extends BaseController {
function __construct()
{
parent::__construct();
}
}
?>
and BaseController.php in application/core folder as follows 和application / core文件夹中的BaseController.php如下
<?php
class BaseController extends CI_Controller {
function __construct()
{
parent::__construct();
}
}
?>
I m getting error as Fatal error: Class 'BaseController' not found in 我收到致命错误消息:找不到“ BaseController”类
The class file name must begin with "MY_" unless you've changed it in config.php. 类文件名必须以“ MY_”开头,除非已在config.php中对其进行了更改。
$config['subclass_prefix'] = 'MY_';
https://ellislab.com/codeIgniter/user-guide/general/core_classes.html https://ellislab.com/codeIgniter/user-guide/general/core_classes.html
Hope this helps. 希望这可以帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.