File download issue

$file_name = "m_files1.zip";
$fullPath = WWW_ROOT . 'zip_files' . DS . $file_name;
if (file_exists($fullPath)) {
            echo "<br>Found";
            return $this->response
                            ->withHeader('Content-Type', $mime)
                            ->withHeader('Content-Transfer-Encoding', 'Binary')
                            ->withHeader('Content-Disposition', 'attachment;filename="' . $file_name . '"')
                            ->withHeader('Content-Description', 'File Transfer')
                            ->withHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0')
                            ->withHeader('Cache-Control', 'public')
                            ->withHeader('Expires', '0')
                            ->withHeader('Pragma', 'public')
                            ->withHeader('Content-Length', filesize($fullPath))
                            ->withFile(
                                    $fullPath,
                                    array('download' => true, 'name' => $file_name)
            );
        }

Don’t why after download zip file not open.

But if i download through direct file link, then that zip open perfectly.

what is the issue, please help me to fix.
I’m using cakephp3.8 .

Echoing something here is going to mess up the sending of headers. Don’t know if that will cause the problem you’re seeing, but it sure won’t help.

Yup. Check that actual file downloaded - I wouldn’t be surprised if the echo <br>found was the first bytes in the file.
Even having a carriage return a the end can break it. For instance if you made just a simple php which downloaded a file by setting the header then sending the data, then close the php with a ?> that alone can corrupt the download.

After remove echo issue fixed.
Thanks.