ZipArchive PHP show Pop Up Execute

enter image description here

I used ZipArchive to create file ZIP and when i click it show Pop Up like that

I don’t know why file show like that, but content file still working

i have code like

$zip = new ZipArchive;

$zip->open($zip_path . $zipname, ZIPARCHIVE::CREATE);

$content = tar_write_contents_text()

$zip->addFromString($content)


    public function tar_write_contents_text($phisfn, $head = "")
{
    if (@is_dir($phisfn)) {
        return;
    }
    else {
        $r = null;
        if (!file_exists($phisfn)) {
            return;
        }
        $f2 = fopen($phisfn, "rb");
        if ($head) $r .= $head;
        while (!feof($f2)) {
            $r .= fgets($f2, 1024);
            ob_flush();
            flush();
        }
        fclose($f2);
        return $r;
    }
}

Thanks for all your help