我是 MVC 新手,正在尝试使用 codeignater 将现有项目转换为 MVC。以下是当前的项目结构及其内容。
我想知道,哪个方法去哪个控制器。在这里,指导真的会帮助我。
index.php //contains links to students.php, professors.php, student_prof.php, admin/index.php
students.php //lists all students
professors.php //lists all professors
stud_prof.php //lists both students along with thier respective professors
admin //folder
index.php //login page
students.php // add, edit, delete, list students
professors.php // add, edit, delete, list professors
logout.php //logout for admin
我的尝试:
models
Students_model //add, edit, delete, list methods
Professors_model //add, edit, delete, list methods
Admin //login method
controllers
Index // show_links method
Students //add, edit, delete, list students methods
Professors //add, edit, delete, list professors methods
Admin //login, logout methods