简体   繁体   English

加载codeigniter输入库

[英]load codeigniter input library

$this->load->library("input"); 

what is the point of loading above code? 加载以上代码有什么意义? found it in someone's code. 在某人的代码中找到它。 This is the function : 这是功能:

public function do_add(){
    $this->load->library("input");
    $title = $this->input->post("title");
    $text = $this->input->post("text");

    $this->load->model("post_model", "model");
    $this->model->add($title, $text);

    redirect(site_url("post"));
}

From Codeigniter user guide : Codeigniter用户指南中

Note: This class is initialized automatically by the system so there is no need to do it manually. 注意:此类由系统自动初始化,因此无需手动进行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM