Basically I have two controllers using CodeIgniter for a simple blog for a project at school. One is Home which is the login page. The other is Member for when they are signed in. in this member controller I am creating functions for add_post(), view_users_posts(), etc. Member.php
class Member extends CI_Controller{
function __construct(){
parent::__construct();
$is_logged_in = $this->session->userdata( is_logged_in );
if (!isset($is_logged_in) || $is_logged_in !== true) {
redirect( home );
}
}
public function index() {
$this->load->library( pagination );
$config[ base_url ] = base_url() . index.php/member/index/ ;
$config[ total_rows ] = $this->db->get( posts )->num_rows();
$config[ per_page ] = 5;
$config[ num_links ] = 20;
$this->pagination->initialize($config);
$data[ posts ] = $this->posts_model->get_all_posts($config[ per_page ], $this->uri->segment(3));
$this->load->view( member_view , $data);
}
public function add_post() {
$this->load->view( add_post_view );
}
My member view has a nav menu with links to these functions like so: member_view.php
<li><a href="member">Home</a></li>
<li><a href="member/add_post">Add Post</a></li>
<li><a href="member/view_users_posts">My Posts</a></li>
<li><a href="member/reset_pass">Reset Password</a></li>
<li><a href="member/logout">Logout</a></li>
我在知道什么是成文时,就没有了。 基本上,如果用户点击添加员额,就应当提到职能增加——控制人员中将装上“附加”的词句? 或者,它是否直接给一位称为“Add”的新控制员,该员额将装上观点?
我的理由是,如果我点击增设员额,那么我就把这个职位带给各位成员/代表,但当我点回家时,我再找成员/成员,然后再加一个职位。
我希望这一点是有意义的,我完全是损失了。 感谢任何帮助!