아래의 소스대로 배열값에 데이터를 넣어 인코드후 화면에 뿌려주면 된다. 해당 페이지를 저장하면 완성 foreach($rows as $v){ $data[] = array("title"=>$v['title'],"writer"=>$v['writer'],"email"=>$v['email'],"youtube"=>$v['youtube'],"n_date"=>$v['n_date']); } $rst = json_encode($data); header("Pragma: no-cache"); header("Cache-Control: no-store, no-cache, max-age=0, must-revalidate"); header('Content-Type: application/json'); print($rst);...
json 파일 만들기에 대한 요약내용입니다.
자세한 내용은 아래에 원문링크를 확인해주시기 바랍니다.