json 파일을 data.json으로 전달하는 방법 curl_setot($ch, CURLOPT_POSTFIELDS, @data.json)
전체 data.json 파일이 전달되도록합니다.
파일의 내용을 전달하려는 경우
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, file_get_contents($file_data_json));
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json'));
파일을 업로드로 보내려면 :
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, array("data.json" => $file_data_json));
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다