[英]CodeIgniter : How to get data/select data and append to the PHP code with ajax request
[英]How to get the request data in 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.
}
}
謝謝,有什么建議嗎?
$this->input->post
這是錯誤的,但是您可以嘗試以下操作,因為post()
是方法而不是屬性
print_r($this->input->post());return;
您在代碼中犯了一個錯誤,丟失了函數括號post()
代碼應該像這樣
print_r($this->input->post());
試試這個可能會幫助你
print_r($this->input->post());
die();
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.