Ich bekomme Fehler für die Zeile "/ core/session/manager-> start();"Parse-Fehler: Syntaxfehler, unerwartete '/' in Zeile 728
Bitte geben Sie eine Lösung für diesen Fehler an.
// 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');
}
Es ist mehr als wahrscheinlich auf der Linie ein fehlendes Semikolon vor ... obwohl ohne mehr Code ist es schwierig, zu sagen . –
Mögliches Duplikat von [PHP Parse/Syntax Errors; und wie man sie löst?] (http://stackoverflow.com/questions/18050071/php-parse-syntax-errors-and-how-to-solve-them) –
@GarryWelding finden Sie den Code zuvor nach der genannten Zeile in der Frage if (leer ($ CFG-> sessiontimeout)) { $ CFG-> sessiontimeout = 7200; } /core/session/manager-> start(); if (AJAX_SCRIPT) { if (! Core_useragent-> supports_json_contenttype()) { // Irgendein blutig alter IE. @header ('Inhaltstyp: text/plain; charset = utf-8'); @header ('X-Content-Type-Optionen: nosniff'); } – naresh