Error when zipping

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
gretzky56
Forum Newbie
Posts: 4
Joined: Sun Feb 24, 2008 1:35 pm

Error when zipping

Post by gretzky56 »

I get a Parse error: syntax error, unexpected ')', expecting '(' in xxx on line 43

When i run a php file that creates a zip file. Then line that the error ocures in is

Code: Select all

if ($zip->open($filename, ZIPARCHIVE::CREATE)!== TRUE) {
            exit("cannot open <$filename>\n");
        }
Now i have a test server on my computer that runs php 5 and the version on the server where my domain is the version is php 4. I guess that there is a problem there. Can anyone help in any way?
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Error when zipping

Post by Christopher »

Which is line 43? What code is before this code?
(#10850)
gretzky56
Forum Newbie
Posts: 4
Joined: Sun Feb 24, 2008 1:35 pm

Re: Error when zipping

Post by gretzky56 »

No need for help anymore. Fixed it. It was just a matter of php versions.

cheers
Post Reply