如何在codeigniter中获取请求数据

sra*_*dha 1 php codeigniter

我是codeigniter的新手.

我正在尝试打印所需的表单数据.

我想要一堆数据,但我无法获取它.

在这里我得到单个数据.我想要整个数据.

我试过以下代码.

<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Ticket extends CI_Controller {

    public function insert_ticket()
    {   


    echo $title = $this->input->post("title");//getting single data
        print_r($this->input->post);exit;//This one is not working.
    }
}
Run Code Online (Sandbox Code Playgroud)

谢谢.任何建议?

Rej*_*lam 5

$this->input->post这是错误的,你可能会尝试如下,因为这post()是一个方法而不是属性

print_r($this->input->post());return;
Run Code Online (Sandbox Code Playgroud)