末使用数字我有以下我的主控制器笨 - 我不能网址
public function chapter-1() {
$data['title'] = "Hello";
$this->load->view("site_head", $data);
$this->load->view("site_header");
$this->load->view("site_content");
$this->load->view("site_footer");
}
但是当我写“公共职能章-1”,1号亮起橙色,我希望可以使用第1章将www.webpage.com/chapter-1加入我的网站。我怎样才能完成它?
功能名称不能包含连字符('-')使用下划线。像这个'chapter_1' –
只需将函数名称更改为chapter1并且它应该可以工作。 – Hackerman