I can't load index.php file in view folder. The error displayed is
"Unable to load the requested file: calendar/index.php"
Here is the code
controller(Calendar.php):
*public function __construct() { Parent::__construct(); $this->load->model("calendar_model"); } public function index() { $this->load->view("calendar/index.php", array()); }*
model(Calendar_model.php):
*?php class Calendar_Model extends CI_Model { } ?>*
view (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>*
Better rename your index.php like V_index.php
for this case remove .php from your code
public function __construct()
{
Parent::__construct();
$this->load->model("calendar_model");
}
public function index()
{
$this->load->view("calendar/index", array());
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.