tarun Posted June 3, 2007 Share Posted June 3, 2007 Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/www/tpatelphp.awardspace.com/custom/createZip.inc.php on line 11 01. <?php 02. 03. /** 04. * Class to dynamically create a zip file (archive) 05. * 06. * @author Rochak Chauhan 07. */ 08. 09. class createZip { 10. 11. public $compressedData = array(); 12. public $centralDirectory = array(); // central directory 13. public $endOfCentralDirectory = "\x50\x4b\x05\x06\x00\x00\x00\x00"; //end of Central directory record 14. public $oldOffset = 0; 15. Can't Figure Out The Problem With It If This Helps Its From The PHP createZip Class Quote Link to comment https://forums.phpfreaks.com/topic/54112-solved-parse-error-createzip-class/ Share on other sites More sharing options...
trq Posted June 3, 2007 Share Posted June 3, 2007 What version of php are you running? Quote Link to comment https://forums.phpfreaks.com/topic/54112-solved-parse-error-createzip-class/#findComment-267510 Share on other sites More sharing options...
tarun Posted June 3, 2007 Author Share Posted June 3, 2007 PHP version 4.4.1 Thnx, Tarun Quote Link to comment https://forums.phpfreaks.com/topic/54112-solved-parse-error-createzip-class/#findComment-267511 Share on other sites More sharing options...
trq Posted June 3, 2007 Share Posted June 3, 2007 The visibility declaration public does not exist in php4.*. This code is written for php5. Quote Link to comment https://forums.phpfreaks.com/topic/54112-solved-parse-error-createzip-class/#findComment-267515 Share on other sites More sharing options...
tarun Posted June 3, 2007 Author Share Posted June 3, 2007 Oh... Do You Know What I Should Do? Thnx, Tarun Quote Link to comment https://forums.phpfreaks.com/topic/54112-solved-parse-error-createzip-class/#findComment-267520 Share on other sites More sharing options...
trq Posted June 3, 2007 Share Posted June 3, 2007 Unless you know the differences between 4 and 5 it might be easier to just find another class. You could try simply removing any visability declarations (public, private, protected) and see how you go. Quote Link to comment https://forums.phpfreaks.com/topic/54112-solved-parse-error-createzip-class/#findComment-267523 Share on other sites More sharing options...
tarun Posted June 5, 2007 Author Share Posted June 5, 2007 Thnx For The Advice Ive Deccided To Use Another Class (Which Has More Features) CheerZ, Tarun Quote Link to comment https://forums.phpfreaks.com/topic/54112-solved-parse-error-createzip-class/#findComment-268611 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.