开发者

PHP Extract zip file issue

I wrote an installer script in php for a php application I wrote, but when it extracts all the files it adds new lines to all the pages in my code which makes the code look nasty. I tried to rtrim, but to no avail the extra lines are still there. Has anyone had this issue or know of a solution to prevent the new lines being made on zip extract?

Here's the code as requested: http://paste2.org/p/1703860 It is the unzip function, which is this:

function unzip($package)
      {
                $zip = new ZipArchive;
                $res = $zip->open($package);
                if ($res === TRUE) {
                        $zip->extractTo(dirname(__FILE__));
                        $zip->close();
                        //echo "Package extracted";
           开发者_如何学JAVA             return true;
                } else {
                        //echo "Package failed to extract";
                        return false;
                }
    } 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜