本文整理汇总了PHP中Authentication::session_start方法的典型用法代码示例。如果您正苦于以下问题:PHP Authentication::session_start方法的具体用法?PHP Authentication::session_start怎么用?PHP Authentication::session_start使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Authentication
的用法示例。
在下文中一共展示了Authentication::session_start方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: logout
static function logout()
{
Authentication::session_start();
session_unset();
session_destroy();
setcookie("Justitia", "", time() - 3600, "/");
}
示例2: write
function write()
{
Authentication::session_start();
// we need the current user later
$base = htmlspecialchars(Util::base_url());
$title = htmlspecialchars($this->title());
header('Content-Type: text/html; charset=UTF-8');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title><?php
echo $title;
?>
- <?php
echo $this->app_name();
?>
</title>
<link rel="stylesheet" type="text/css" href="<?php
echo $base;
?>
style/style.css">
<link rel="stylesheet" type="text/css" href="<?php
echo $base;
?>
style/jquery.autocomplete.css">
<link rel="shortcut icon" href="<?php
echo $base;
?>
style/favicon.png">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="<?php
echo $base;
?>
style/jquery.autocomplete.js"></script>
<script type="text/javascript" src="<?php
echo $base;
?>
style/script.js"></script>
<base href="<?php
echo $base;
?>
">
</head>
<body<?php
if ($this->is_admin_page) {
echo ' class="admin"';
}
?>
>
<div id="header">
<div id="appname"><?php
echo $this->app_name();
?>
, <small>Programming Judge</small></div>
<?php
$this->write_user_header();
?>
</div>
<div id="tabbar">
<?php
$this->write_tabbar();
?>
</div>
<div id="nav-wrap">
<?php
$this->write_nav();
?>
</div>
<div id="main">
<h1><?php
echo $title;
?>
</h1>
<?php
$this->write_rejudge_all();
?>
<?php
$this->write_body();
?>
</div>
</body>
</html>
<?php
}
示例3: start_session
private static function start_session()
{
Authentication::session_start();
if (!isset($_SESSION['usergroup'])) {
// not set, initialize
$_SESSION['usergroup'] = array();
}
}