鍍金池/ 問答/PHP  HTML/ CodeIgniter框架的$this->input->post()

CodeIgniter框架的$this->input->post()獲取ajax傳到后臺的參數(shù)為什么是一推包含標(biāo)簽的東西

CodeIgniter框架的$this->input->post()獲取ajax傳到后臺的參數(shù)為什么是一推包含標(biāo)簽的東西
前端:
$.ajax({

            url: "admin.php?d=morketing&c=activity&m=updateAct",
            type: "POST",
            dataType: 'json',
            // data:  $('form.form-horizontal').serialize(),
            data:  parameter,
            success: function(data) {
      });

后臺:
$data = $this->input->post();
var_dump($data);
<pre class='xdebug-var-dump' dir='ltr'>
F:wampwwwmanageapplicationadmincontrollersmorketingActivity.php:64:
array (size=12)
'Fact_id' <font color='#888a85'>=></font> string <font color='#cc0000'>'1018'</font> (length=4)
'Fact_name' <font color='#888a85'>=></font> string <font color='#cc0000'>''</font> (length=0)
'Fact_desc' <font color='#888a85'>=></font> string <font color='#cc0000'>''</font> (length=0)
'Fact_type' <font color='#888a85'>=></font> string <font color='#cc0000'>'0'</font> (length=1)
'Fact_start_time' <font color='#888a85'>=></font> string <font color='#cc0000'>'0000-00-00 00:00:00'</font> (length=19)
'Fact_end_time' <font color='#888a85'>=></font> string <font color='#cc0000'>'0000-00-00 00:00:00'</font> (length=19)
'Forganizer' <font color='#888a85'>=></font> string <font color='#cc0000'>''</font> (length=0)
'Fcity' <font color='#888a85'>=></font> string <font color='#cc0000'>''</font> (length=0)
'Faddress' <font color='#888a85'>=></font> string <font color='#cc0000'>''</font> (length=0)
'Fuser_take_max' <font color='#888a85'>=></font> string <font color='#cc0000'>'0000-00-00 00:00:00'</font> (length=19)
'Fmemo' <font color='#888a85'>=></font> string <font color='#cc0000'>''</font> (length=0)
'Fact_detail' <font color='#888a85'>=></font> string <font color='#cc0000'>' <p>濡傛灉鍒涗笟鏄棬瀛﹂棶錛屽畠鏈夋柟娉曡鍚楋紵</p><p>濡傛灉鏈潵鍙鎻愬墠棰勬祴錛岄偅鎴戜滑璇ュ浣曟劅鐭モ€滈鍙b€濈殑鍒版潵錛 </p><p>鎶曡繃婊存淮鐨勬湵鍟歌檸榪欑被涓€綰挎姇璧勪漢鐨勬瘡澶╅兘鍦ㄦ兂浠€涔堬紵</p><p>銆 5鍒嗛挓鍒涗笟璇俱€嬪府浣犲洖絳斾笂榪版墍鏈夐棶棰樸€傚皬鍒頒竴涓垱涓氱偣瀛愮殑鐢熸垚錛屽ぇ鍒頒竴瀹跺垱涓氬叕鍙稿浣曡蛋涓奍PO銆傛洿閲嶈鐨勬槸錛屾湰涓撴爮鐨勪綔鑰呮洸鍑涓猴紝</p><p>鍒涗笟鈥濅笉鏄竴涓嫮涔夌殑璇嶈錛岃€屾槸榪欎釜鏃 '...</font> (length=1277)
</pre>

回答
編輯回答
雨蝶

你先打印你的parameter,然后傳json格式數(shù)據(jù),后臺$data = $this->input->post("data");

2017年5月6日 08:27