ajax 500 Internal Server Error 질문드려요. 채택완료
</strong></p><p><strong><script type="text/javascript"></strong></p><p><strong>
function kin() {
</strong></p><p><strong>var kobj = document.getElementById("wr_1").value;</strong></p><p><strong> var subject = "";
var content = "";
$.ajax({
url: "<?=$board_skin_path?>/ajax_re.php",
type: "POST",
data: {
"subject": kobj,
"content": kobj
},
dataType: "json",
async: false,
cache: false,
success: function(data, textStatus) {
subject = data.subject;
content = data.content;
}
});</strong></p><p><strong> }
</SCRIPT> </strong></p><p><strong>
ajax_re.php
</strong></p><p><strong><? </strong></p><p><strong>$subject = $_POST['subject'];
$content = $_POST['content'];</strong></p><strong><p>
$max_wr1 =sql_fetch("select max(wr_1) as m1 from g4_write_corporation_car_log");</p><p> </p><p> $result =sql_query("select * from g4_write_corporation_car_log where (wr_1 between '$subject' and '$max_wr1[m1]') order by wr_1 asc");
for ($i=0; $wow=mysql_fetch_array($result); $i++) {
$row[$i] = $wow[wr_3];
}
$out .= $row[0]."<BR/>";
$out1 .= $row[0]."<BR/>";
die("{\"subject\":\"$out\",\"content\":\"$out1\"}");
?> </p></strong><p><strong>
var kobj = document.getElementById("wr_1").value; 자료 값은 20160601 00:00:00 형태.
파이어버그에서는
http://192.168.0.3/skin/board/corporation_car_log/ajax_re.php">http://192.168.0.3/skin/board/corporation_car_log/ajax_re.php
500 Internal Server Error |
Parameters | |
| content | 20160601 17:38:36 |
| subject | 20160601 17:38:36 |
Source | |
|
답변 3개
ajax_re.php
상단에 common.php 파일을 불러오셔야 db 접속이 되실듯
참고파일
/bbs/ajax.~~~~~.php 파일들.
답변에 대한 댓글 2개
댓글을 작성하려면 로그인이 필요합니다.
ajax_re.php 파일에서
sql_fech 와 sql_query는 함수입니다.
common.php파일 포함시켜야됩니다.
그래도 안되시면 제일 위줄부터 주석처리하면서 에러 라인 잡으세여
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인