$ this-> genlib-> ajaxOnly()是什么?是什么意思?

时间:2019-09-10 15:22:43

标签: php

这些天,我一直在尝试学习一些php,为此我一直在github上阅读一些代码。我看到了这个项目,并决定从那里阅读代码,我一直在阅读这一行特定的代码,但我不知道它的真正含义。谁能向我解释? (对不起,我的傻瓜)

public function lilt(){
        $this->genlib->ajaxOnly();

        $this->load->helper('text');

        //set the sort order
        $orderBy = $this->input->get('orderBy', TRUE) ? $this->input->get('orderBy', TRUE) : "name";
        $orderFormat = $this->input->get('orderFormat', TRUE) ? $this->input->get('orderFormat', TRUE) : "ASC";

        //count the total number of items in db
        $totalItems = $this->db->count_all('items');

1 个答案:

答案 0 :(得分:0)

ajaxOnly()genlib类的方法。如果传入请求不是通过ajax发出的,function of it似乎会显示一条错误消息。