首页 > 解决方案 > $this->genlib->ajaxOnly(); 是什么?意思是?

问题描述

这些天我一直在尝试学习一些 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');

标签: php

解决方案


ajaxOnly()genlib类的方法。如果传入的请求不是通过 ajax 发出的,它的功能似乎是显示错误消息。


推荐阅读