本文整理汇总了PHP中Redirect::session_request_uri方法的典型用法代码示例。如果您正苦于以下问题:PHP Redirect::session_request_uri方法的具体用法?PHP Redirect::session_request_uri怎么用?PHP Redirect::session_request_uri使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Redirect
的用法示例。
在下文中一共展示了Redirect::session_request_uri方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: redirect_to
function redirect_to($sso, $user_id, $logged_in)
{
if (isset($sso['target']) && !empty($sso['target'])) {
header('Location: ' . $sso['target']);
} else {
//Use this handy function to deal with platform settings
Redirect::session_request_uri($logged_in, $user_id);
}
exit;
}
示例2: go
/**
* Checks whether the given URL contains "http". If not, prepend the web
* root of Chamilo and send the browser there (HTTP redirect)
* @param string $url
*/
public static function go($url = '')
{
if (empty($url)) {
Redirect::session_request_uri();
$www = self::www();
self::navigate($www);
}
$is_full_uri = strpos($url, 'http') === 0;
if ($is_full_uri) {
self::navigate($url);
}
$url = self::www() . $url;
self::navigate($url);
}
示例3: api_get_utc_datetime
$_SESSION['studentview'] = 'teacherview';
}
}
if (isset($_cid)) {
$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
$time = api_get_utc_datetime();
$sql = "UPDATE {$tbl_course} SET last_visit = '{$time}' WHERE code='{$_cid}'";
Database::query($sql);
}
// direct login to course
if (isset($cas_login) && $cas_login && exist_firstpage_parameter() || $logging_in && exist_firstpage_parameter()) {
$redirectCourseDir = api_get_firstpage_parameter();
api_delete_firstpage_parameter();
// delete the cookie
if (!isset($_SESSION['request_uri'])) {
if (CourseManager::get_course_id_from_path($redirectCourseDir)) {
$_SESSION['noredirection'] = false;
$_SESSION['request_uri'] = api_get_path(WEB_COURSE_PATH) . $redirectCourseDir . '/';
}
}
} elseif (api_user_is_login() && exist_firstpage_parameter()) {
$redirectCourseDir = api_get_firstpage_parameter();
api_delete_firstpage_parameter();
// delete the cookie
if (CourseManager::get_course_id_from_path($redirectCourseDir)) {
$_SESSION['noredirection'] = false;
$_SESSION['request_uri'] = api_get_path(WEB_COURSE_PATH) . $redirectCourseDir . '/';
}
}
Redirect::session_request_uri($logging_in, $user_id);