Я получаю сообщение об ошибке для строки «/ core/session/manager-> start();»Ошибка анализа: синтаксическая ошибка, неожиданная '/' в строке 728
Сообщите, пожалуйста, об этом решении.
// Start session and prepare global $SESSION, $USER.
if (empty($CFG->sessiontimeout)) {
$CFG->sessiontimeout = 7200;
}
/core/session/manager->start();
// Set default content type and encoding, developers are still required to use
// echo $OUTPUT->header() everywhere, anything that gets set later should override these headers.
// This is intended to mitigate some security problems.
if (AJAX_SCRIPT) {
if (!core_useragent->supports_json_contenttype()) {
// Some bloody old IE.
@header('Content-type: text/plain; charset=utf-8');
@header('X-Content-Type-Options: nosniff');
} else if (!empty($_FILES)) {
// Some ajax code may have problems with json and file uploads.
@header('Content-type: text/plain; charset=utf-8');
} else {
@header('Content-type: application/json; charset=utf-8');
}
} else if (!CLI_SCRIPT) {
@header('Content-type: text/html; charset=utf-8');
}
Это более чем вероятно, недостающее полу двоеточие на линии раньше ... хотя и не больше кода, трудно сказать , –
Возможный дубликат [PHP Parse/Syntax Errors; и как их решить?] (http://stackoverflow.com/questions/18050071/php-parse-syntax-errors-and-how-to-solve-them) –
@GarryWelding, пожалуйста, найдите код до того, как указанная строка в вопросе if (empty ($ CFG-> sessiontimeout)) { $ CFG-> sessiontimeout = 7200; } /core/session/manager-> start(); if (AJAX_SCRIPT) { if (! Core_useragent-> supports_json_contenttype()) { // Какой-то кровавый старый IE. @header ('Content-type: text/plain; charset = utf-8'); @header ('X-Content-Type-Options: nosniff'); } – naresh