我无法在视图文件夹中加载index.php文件。显示的错误是
“无法加载请求的文件:calendar / index.php”
这是代码
controller(Calendar.php):
*public function __construct() {
Parent::__construct();
$this->load->model("calendar_model");
}
public function index()
{
$this->load->view("calendar/index.php", array());
}*
模型(Calendar_model.php):
*?php
class Calendar_Model extends CI_Model
{
}
?>*
视图(index.php):
*<div class="container">
<div class="row">
<div class="col-md-12">
<h1>Calendar</h1>
<div id="calendar">
<script type="text/javascript">
$(document).ready(function() {
$('#calendar').fullCalendar({
});
});
</script>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$(document).ready(function() {
});
</script>*
答案 0 :(得分:0)
最好像V_index.php一样重命名index.php
在这种情况下,请从您的代码中删除.php
public function __construct()
{
Parent::__construct();
$this->load->model("calendar_model");
}
public function index()
{
$this->load->view("calendar/index", array());
}