本文整理汇总了PHP中cookie::check_cookie方法的典型用法代码示例。如果您正苦于以下问题:PHP cookie::check_cookie方法的具体用法?PHP cookie::check_cookie怎么用?PHP cookie::check_cookie使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cookie
的用法示例。
在下文中一共展示了cookie::check_cookie方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: SQLite3
* If yes, then redirect to create.php
*/
if (sqlite_file == '' || !file_exists(sqlite_file)) {
$htmlinst->change_location("./create.php");
}
$_SERVER['REMOTE_ADDR'] = $util->get_client_ip($_SERVER);
$phpFiglet->loadFont("./figlet/spliff.flf");
$db = new SQLite3(sqlite_file, SQLITE3_OPEN_READWRITE);
$title = $db->query("SELECT Name, Value FROM Options WHERE Name='title';");
$title = $title->fetchArray(SQLITE3_ASSOC);
/*
* Check if user have old_skkooll cookie
* If yes, then give appropriate privilege to user through cookie::check_cookie function
*/
if (isset($_COOKIE['old_skkooll'])) {
$cook_book = $cook->check_cookie($_COOKIE['old_skkooll'], random_str, $db);
}
?>
<link rel="stylesheet" href="./style.css" />
<script type="text/javascript" src="./js/jquery.min.js"></script>
<script type='text/javascript' src="./js/jquery.imagefit-0.2.js"></script>
<script type="text/javascript" src="./js/jstz.min.js"></script>
<script type='text/javascript' src="./js/script.js"></script>
<script type='text/javascript'>
// to get appropriate timezone for visitor
// then set it up into cookie 'timezone'
var timezone = jstz.determine();
setCookie('timezone', timezone.name(), 7);
</script>