Rumah > pembangunan bahagian belakang > tutorial php > 深夜发帖,有些灵异

深夜发帖,有些灵异

WBOY
Lepaskan: 2016-06-13 11:14:28
asal
871 orang telah melayarinya

深夜发帖,有点灵异
Hello,

function chk_commit_query(table_name,reg_id_base, reg_id_cmp, csv_file){<br />    if(chk_items.length === 0){<br />        alert('no items selected! And select all items in default!');<br />        chk_sql_base = 'select * from ' + table_name + ' where Regression_Id = ' + reg_id_base;<br />        chk_sql_cmp  = 'select * from ' + table_name + ' where Regression_Id = ' + reg_id_cmp;<br />    }<br />    else{<br />        chk_sql_base = 'select TestCase, Design_name, ';<br />        chk_sql_cmp  = 'select TestCase, Design_name, ';<br />        for (var i=0;i<chk_items.length - 1;i++){<br />            chk_sql_base += chk_items[i] + ', '<br />            chk_sql_cmp  += chk_items[i] + ', '<br />        }<br />        chk_sql_base += chk_items[i] + ' from ' + table_name + ' where Regression_Id = ' + reg_id_base;<br />        chk_sql_cmp  += chk_items[i] + ' from ' + table_name + ' where Regression_Id = ' + reg_id_cmp;<br />    }<br />    xmlHttp=GetXmlHttpObject()<br />    if (xmlHttp==null)<br />    {<br />        return<br />    }<br />    var url="show_cmp_internal_chk_table.php"<br />    url=url+"?sql_chk_cmp1 ="+chk_sql_cmp;<br />    url=url+"&sql_chk_base="+chk_sql_base;<br />    url=url+"&csv_file="+csv_file;<br />    url=url+"&sid="+Math.random()<br />    alert(url);<br />//此处得到的数据为:<fieldset><legend class="font_bold">引用</legend><blockquote>show_cmp_internal_chk_table.php?sql_chk_cmp1 =select TestCase, Design_name, Succeed, Syn from ACE_CHK_FLOW where Regression_Id = 585&sql_chk_base=select TestCase, Design_name, Succeed, Syn from ACE_CHK_FLOW where Regression_Id = 592&csv_file=ACE_20130128-0150_VS_20130130-0150_Regression_QOR_dif_2013_02_03&sid=0.5060912349899407</blockquote></fieldset><br />    xmlHttp.onreadystatechange=chk_stateChanged <br />    xmlHttp.open("GET",url,true)<br />    xmlHttp.send(null)<br />}<br />
Salin selepas log masuk

show_cmp_internal_chk_table.php:
<?php<br />$csv_data4 = Array();<br />$sql_chk_cmp  = $_GET["sql_chk_cmp1"];<br />$sql_chk_base = $_GET["sql_chk_base"];<br />echo $sql_chk_base."<br>";<br />echo $sql_chk_cmp."<br>";<br />...
Salin selepas log masuk

这里$sql_chk_base有数据,$sql_chk_cmp无论如何却为空,看url的信息也是有这个数据的,这是什么事情啊。这样的ajax代码用的少说也得数百次了。


------解决方案--------------------
莫非url参数后面多了个空格?
------解决方案--------------------
Label berkaitan:
sumber:php.cn
Kenyataan Laman Web ini
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn
Tutorial Popular
Lagi>
Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan