Loading...
Помощь по скриптам | Вопрос Parse error: syntax error, unexpected
как исправить?
Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in


<?php
/*
* JohnCMS NEXT Mobile Content Management System (http://johncms.com)
*
* For copyright and license information, please see the LICENSE.md
* Installing the system or redistributions of files must retain the above copyright notice.
*
* @link http://johncms.com JohnCMS Project
* @copyright Copyright (C) JohnCMS Community
* @license GPL-3
*/

define('_IN_JOHNCMS', 1);

require('system/bootstrap.php');

$act = isset($_GET['act']) ? trim($_GET['act']) : '';


if (isset($_SESSION['ref'])) {
unset($_SESSION['ref']);
}

if (isset($_GET['err'])) {
$act = 404;
}

switch ($act) {
case '404':
/** @var Johncms\Api\ToolsInterface $tools */
$tools = App::getContainer()->get(Johncms\Api\ToolsInterface::class);

$headmod = 'error404';
require('system/head.php');
echo $tools->displayError(_t('The requested page does not exists'));
break;

default:
// Главное меню сайта
if (isset($_SESSION['ref'])) {
unset($_SESSION['ref']);
}
$headmod = 'mainpage';
require('system/head.php');
include 'system/mainmenu.php';
}

require('system/end.php');
Зачем в дефолте ? }
________
посл. ред. 14.12.2017 в 15:31; всего 1 раз(а); by TaHi4kA
if (isset($_GET['err'])) {
$act = 404;
}

switch ($act) {
case '404':
/** @var Johncms\Api\ToolsInterface $tools */
$tools = App::getContainer()->get(Johncms\Api\ToolsInterface::class);

$headmod = 'error404';
require('system/head.php');
echo $tools->displayError(_t('The requested page does not exists'));
}
break;

default:
// Главное меню сайта
if (isset($_SESSION['ref'])) {
unset($_SESSION['ref']);
}
$headmod = 'mainpage';
require('system/head.php');
include 'system/mainmenu.php';
Мля... Джон Гг
не помогает
TaHi4kA (14.12.2017 в 15:31)
Зачем в дефолте ? }

там все правильно
129502630 (14.12.2017 в 15:42)
не помогает

Значит $act смотри
129502630 , полностью файл скинь и ошибку
Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /var/www/sti961/data/www/xn--80aaaan1cfea0n.xn--p1acf/index.php on line 31
файл
Онлайн: 7
Время:
Gen. 0.1222
(c) Bym.Guru 2010-2026