S3의 보안 버킷에서 zip 파일을 프로그래밍 방식으로 다운로드하려고하는데 다운로드가 브라우저로 보내지면 영수증 페이지가 표시됩니다.S3에서 파일 다운로드 및 cURL을 사용하여 리디렉션
는하지만 대신 브라우저에 출력되고있다 미친 캐릭터의 모든 종류를 점점 계속 :
$url = "https://s3.amazonaws.com/{$bucket}/{$resource}?{$authentication_params}";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('response-content-type: application/zip', 'response-content-disposition: attachment', 'Expect: 100-continue'));
$response = curl_exec($ch);
curl_close($ch);
나는 파이어 폭스, 다운로드 작품의 주소 표시 줄에 $url
을 입력합니다. 파일을 다운로드 한 다음 영수증 페이지로 이동하려면 어떻게합니까?
예를 들어주세요. –