本文整理汇总了PHP中SessionUtils::getLanguage方法的典型用法代码示例。如果您正苦于以下问题:PHP SessionUtils::getLanguage方法的具体用法?PHP SessionUtils::getLanguage怎么用?PHP SessionUtils::getLanguage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SessionUtils
的用法示例。
在下文中一共展示了SessionUtils::getLanguage方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: substr
$page = substr($page, strrpos($page, "/") + 1);
}
$page = str_replace(".php", "", $page);
$userBo = UserBo::newInstance($config);
$user = $userBo->getUser();
$isConnected = false;
if (SessionUtils::isConnected($_SESSION)) {
$isConnected = true;
} else {
SessionUtils::setLanguage($user["language"], $_SESSION);
if ($page != "index" && $page != "about") {
header("Location: index.php");
exit;
}
}
$language = SessionUtils::getLanguage($_SESSION);
?>
<!DOCTYPE html>
<html lang="<?php
echo $language;
?>
">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><?php
echo lang("parpaing_title");
?>
</title>
示例2: lang
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with VPN. If not, see <http://www.gnu.org/licenses/>.
*/
include_once "header.php";
?>
<div class="container theme-showcase" role="main">
<ol class="breadcrumb">
<li class="active"><?php
echo lang("breadcrumb_index");
?>
</li>
</ol>
<div class="well well-sm">
<p><?php
echo lang("index_guide");
?>
</p>
</div>
</div>
<script type="text/javascript">
var userLanguage = '<?php
echo SessionUtils::getLanguage($_SESSION);
?>
';
</script>
<?php
include "footer.php";