解析错误:语法错误,第68行意外T_CONSTANT_ENCAPSED_STRING

时间:2016-06-16 06:56:12

标签: php moodle

我是PHP的新手,并且不知道为什么会这样,我看过其他在线项目,但我似乎无法理解为什么我会收到此错误。

if (get_home_page() != HOMEPAGE_SITE) {
// Redirect logged-in users to My Moodle overview if required.
$redirect = optional_param('redirect', 1, PARAM_BOOL);
if (optional_param('setdefaulthome', false, PARAM_BOOL)) {
    set_user_preference('user_home_page_preference', HOMEPAGE_SITE);
} else if (!empty($CFG->defaulthomepage) && ($CFG->defaulthomepage == HOMEPAGE_MY) && $redirect === 1) {
    redirect($CFG->wwwroot .'/my/');
} else if (!empty($CFG->defaulthomepage) && ($CFG->defaulthomepage == HOMEPAGE_USER)) {
    $frontpagenode = $PAGE->settingsnav->find('frontpage', null);
    if ($frontpagenode) {
        $frontpagenode->add(
            get_string('makethismyhome'),
            new moodle_url('/', array('setdefaulthome' => true)),
            navigation_node::TYPE_SETTING);
    } else {
        $frontpagenode = $PAGE->settingsnav->add(get_string('frontpagesettings'), null, navigation_node::TYPE_SETTING, null);
        $frontpagenode->force_open();
        $frontpagenode->add(get_string('makethismyhome'),
            new moodle_url('/', array('setdefaulthome' => true)),
            navigation_node::TYPE_SETTING);
    }
}

}

0 个答案:

没有答案