나는이 문제를 해결할 수 없다. 지금은 내 코드가있다. 나는 xmlhttprequest 또는 매번 내가 $ ("# btnQuery")를 클릭했을 때로드되는 URL을 원한다. 여기에서 발생한 것은 버튼을 클릭하면 서버의 jqgrid에 데이터가 표시됩니다.서버에서 데이터를 가져 오기 위해로드되는 url/xmlhttprequest를 얻는 방법은 무엇입니까?
$("#btnQuery").click(function() {
var params = {
"ID": $("#eID3").val(),
"dataType": "data"
}
var url = 'process.php?path=' + encodeURI('project/view') + '&json=' + encodeURI(JSON.stringify(params));
$('#tblD').setGridParam({
url:url,
datatype: ajaxDataType,
});
$('#tblD').trigger('reloadGrid');
$('#firstur').append('the url: ' + url+'<br>');//the xmlhttpRequest should disply here in my html
$('#secur').append('response: ' + url+'<br>'); //the response of xmlhttpRequest should display here in my html
});
여기에 내 process.php 코드가 있습니다. 이것은 내가 jqgrid에 대한 데이터를 얻을 곳입니다. http://localhost/process.php?....%22:%22%22,%22Password%22:%22%22%7D
그것은 응답 본문이 같은 simething가요 :
불을 지르고 콘솔에서<?php
print(file_get_contents("http://localhost/" . $_GET["path"] . "?json=" . ($_GET["json"])));
?>
표시는 XMLHttpRequest/위치는
{"result":{"ID":"1C1OMk123tJqzbd"}, "time_elapsed":0}
여기 아무도 않습니다 얻는 방법을 알고있는 URL/데이터를 가져 오기 위해로드되는 xmlhttprequest? 및 응답 본문? 나는 내 jqgrid를 제외하고 내 HTML 몸체에 그것을 표시하는 것을 원합니다 ... 나를 도울 수있는 사람이 있습니까? .. 제발 ... 고마워요.
도대체 무슨 일이 벌어 지지만 좋은 보안 문제는 여기에 나와 있습니다. – fabrik