Parse error: syntax error, unexpected T
I am very new to PHP and have no idea why this is happening, I have looked at other online items, however I just cannot seem to see why I am getting this error.
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);
}
}
}
链接地址: http://www.djcxy.com/p/69610.html上一篇: 我正在更新EDT之外的Swing组件吗?
下一篇: 解析错误:语法错误,意外的T