이제이 코드를 얻었습니다.다운로드 상자가 나타나면 어떻게 페이지를 리디렉션 할 수 있습니까?
<?php
$file = "pain.png";
if (file_exists($file)) {
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename='.basename($file));
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-Length: ' . filesize($file));
ob_clean();
flush();
readfile($file);
exit;
}
?>
이 코드는 다운로드 상자에 표시됩니다. 하지만이 페이지를 "감사합니다"페이지로 리디렉션하고 싶습니다. 여기에도 다운로드 상자가 있습니다. 내가 어떻게 할 수 있니?
감사합니다 ...