set_and_exit(); } if (!$out_fd = fopen(TARGET_NAME, 'w+')) { HttpResponse::internal_server_error()->set_and_exit(); } while ($data = fread($in_fd, 4096)) { fwrite($out_fd, $data); }