Virginijus Posted July 17, 2018 Share Posted July 17, 2018 Gal kas esate susidūrę su tokia klaida instaliuojant prestashop_1.7.4.1 Naršyklė išmeta klaidą Parse error: syntax error, unexpected '[' in /..../index.php on line 51 Vevykdo index.php instaliavimo metu. Pažiūrėjau failą, 51 eilutė yra aprašytas masyvas iš archivaroriaus klaidų kodų. function getZipErrorMessage($errorCode) { $errors = [ ZipArchive::ER_EXISTS => "File already exists.", ZipArchive::ER_INCONS => "Zip archive inconsistent or corrupted. Double check your uploaded files.", ZipArchive::ER_INVAL => "Invalid argument.", ZipArchive::ER_MEMORY => "Allocation error. Out of memory?", ZipArchive::ER_NOENT => "Unable to find the release zip file. Make sure that the prestashop.zip file has been uploaded and is located in the same directory as this dezipper.", ZipArchive::ER_NOZIP => "The release file is not a zip file or it is corrupted. Double check your uploaded files.", ZipArchive::ER_OPEN => "Can't open file. Make sure PHP has read access to the prestashop.zip file.", ZipArchive::ER_READ => "Read error.", ZipArchive::ER_SEEK => "Seek error.", ]; if (isset($errors[$errorCode])) { return "Unzipping error - " . $errors[$errorCode]; } return "An unknown error was found while reading the zip file"; } Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now