|
CodeIgniter\application\libraries\Calendar.php
class Calendar
{
public function cal($y, $m, $d)
{
// code
}
}
CodeIgniter\application\controllers\Okok.php
class Okok extends CI_Controller
{
public function index()
{
$this->load->library('calendar');
$getInfo = $this->calendar->cal($cdate[0], $cdate[1], $cdate[2]);
}
}
运行提示 Fatal error: Call to undefined method CI_Calendar::cal()
看手册也就是这样用,却依旧错误。
求助:该如何正确使用自定义的类?有没高人愿意指点下?刚入门CI,找个大师提携,可付费。
|
|