本文整理汇总了PHP中Cache_Lite::lastModified方法的典型用法代码示例。如果您正苦于以下问题:PHP Cache_Lite::lastModified方法的具体用法?PHP Cache_Lite::lastModified怎么用?PHP Cache_Lite::lastModified使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cache_Lite
的用法示例。
在下文中一共展示了Cache_Lite::lastModified方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: count
$levelView++;
$out .= '<p>' . "\n";
if ('1' == $view[$levelView]) {
$tempView[$levelView] = '0';
if (false === ($datagrid[$levelView] = $Cache_Lite->get($levelView))) {
$sql = "SELECT DISTINCT username AS username\n , count(*) AS qty\n FROM `" . $tbl_user . "`\n GROUP BY username\n HAVING qty > 1\n ORDER BY qty DESC\n LIMIT 100";
$data = claro_sql_query_fetch_all($sql);
if (!is_array($data) || 0 == sizeof($data)) {
$data[] = array('-', 'qty' => '-');
}
$dg->set_colTitleList(array(get_lang('Username'), get_lang('count')));
$dg->set_grid($data);
$datagrid[$levelView] .= $dg->render();
$Cache_Lite->save($datagrid[$levelView], $levelView);
}
$out .= '-' . ' ' . '<b>' . get_lang('Accounts with same <i>Username</i>') . '</b>' . ' ' . '<small>' . '[<a href="' . $_SERVER['PHP_SELF'] . '?view=' . $tempView . '">' . get_lang('Close') . '</a>]' . '</small>' . '<br />' . "\n" . $datagrid[$levelView] . '<small>' . get_lang('Last computing') . ' ' . claro_html_localised_date(get_locale('dateTimeFormatLong') . ':%S', $Cache_Lite->lastModified()) . ', ' . get_lang('%delay ago', array('%delay' => claro_html_duration(time() - $Cache_Lite->lastModified()))) . '</small>' . '<br />' . "\n";
} else {
$tempView[$levelView] = '1';
$out .= '+' . ' ' . '<a href="' . $_SERVER['PHP_SELF'] . '?view=' . $tempView . '">' . get_lang('Accounts with same <i>Username</i>') . '</a>' . "\n";
}
$out .= '</p>' . "\n\n";
/***************************************************************************
* Platform access and logins
***************************************************************************/
$tempView = $view;
$levelView++;
$out .= '<p>' . "\n";
if ('1' == $view[$levelView]) {
$tempView[$levelView] = '0';
$out .= '- ' . ' ' . '<b>' . get_lang('Accounts with same <i>Email</i>') . '</b>' . ' ' . '<small>' . '[<a href="' . $_SERVER['PHP_SELF'] . '?view=' . $tempView . '">' . get_lang('Close') . '</a>]' . '</small>' . '<br />' . "\n";
//-- multiple account with same email
示例2: array
//check for cached image with input parameters
if (!($generatedImage = $Cache_Lite->get($paramHash, 'avatar'))) {
//check for cached skin
if (!($playerSkin = $Cache_Lite->get($player))) {
//reduce default timeout
$ctx = stream_context_create(array('http' => array('timeout' => 3)));
if (!empty($player)) {
$playerSkin = @file_get_contents($custom_player, 0, $ctx);
}
if ($playerSkin) {
$Cache_Lite->save($player, $playerSkin);
} else {
// Oh no custom skin? Guess we'll use the default
$playerSkin = @file_get_contents($default_player);
if (DEBUG) {
$DEBUG_TEXT = "Skin Cache Miss: " . (time() - $Cache_Lite->lastModified());
}
}
} else {
if (DEBUG) {
$DEBUG_TEXT = "Skin Cache Hit: " . (time() - $Cache_Lite->lastModified());
}
}
$char = new Char_Image($playerSkin);
$generatedImage = $char->setScale($s)->setBorder($borderColor, $borderWidth)->setFormat($format)->getImage();
$Cache_Lite->save($generatedImage, $paramHash, 'avatar');
if (DEBUG) {
$DEBUG_TEXT = "Image Cache Miss: " . (time() - $Cache_Lite->lastModified());
}
} else {
if (DEBUG) {