ajax 호출을 시도하고 응답으로 응답을 얻으려면 phpfox. phpfox, ajax 호출의 응답으로 값 얻기
JS
:$.ajaxCall('module.check_whether_first_time',
'u_id='+u_id+'&my_user_id='+my_user_id).done(function(data) {
alert(" data = " + data )
});
아약스는 ajax.class.php 내에서 호출하는 기능 :
public function check_whether_first_time(){
$u_id = $this->get('u_id');
$my_user_id=$this->get('my_user_id');
// processing with data goes here
$counter=1;
echo $counter;
}// end of function check_whether_first_time
내가 data
변수에 $counter
의 가치를 얻을 싶어요. 코드는 작동하지 않지만 FireBug는 응답으로 리턴 된 결과가없는 ajax 요청을 표시합니다. 그게 뭐야? ( $ this-> 호출 ('경고 :
사용자 모듈 데이터 변수 나에게 출력을 반환 "어떤 것");'); 코드가 해당 행에 도달했는지 확인하는 것입니다. 사이트에 오류가 있는지 확인하십시오. – Purefan
시험을 보겠습니다. –