我收到错误的行" /核心/会话/管理器 - >开始();"
请告知此错误的任何解决方案。
// 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');
}
答案 0 :(得分:0)
命名空间概念与PHP版本兼容(PHP 5> = 5.3.0,PHP 7)。这可能是PHP版本的问题。请检查您的php版本。
答案 1 :(得分:0)
PHP namespaces语法使用反斜杠。
要修正错误,请替换:
/core/session/manager->start();
使用:
\core\session\manager->start();