本文整理匯總了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);