1) { $ext = $a_ext[1]; } $fname = "$xid.$ext"; $this->load->library("Sas_s3"); $resp = $this->sas_s3->upload("audio-sample", "$xid.{$ext}", $type, file_get_contents($tmp_name)); if ($resp['@metadata']['statusCode'] == 200) { echo json_encode(["status" => "OK", "result" => "file $name of $type ulded to s3 $xid.ogg "]); }; } function index() { $sql = "select concat(Mcu_ResumeKesimpulan, ' Untuk itu disarankan ', Mcu_ResumeSaran) text from mcu_resume where length(Mcu_ResumeSaran) > 20 and length(Mcu_ResumeSaran) > 20 order by rand() limit 0, 1 "; $qry = $this->db->query($sql); $rows = $qry->result_array(); echo json_encode(["status" => "OK", "data" => $rows]); } }