当前位置: 首页>>代码示例>>PHP>>正文


PHP Cache_Lite::lastModified方法代码示例

本文整理汇总了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 .= '-' . ' &nbsp;&nbsp;' . '<b>' . get_lang('Accounts with same <i>Username</i>') . '</b>' . '&nbsp;&nbsp;&nbsp;' . '<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 .= '+' . '&nbsp;&nbsp;&nbsp;' . '<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 .= '- ' . '&nbsp;&nbsp;' . '<b>' . get_lang('Accounts with same <i>Email</i>') . '</b>' . '&nbsp;&nbsp;&nbsp;' . '<small>' . '[<a href="' . $_SERVER['PHP_SELF'] . '?view=' . $tempView . '">' . get_lang('Close') . '</a>]' . '</small>' . '<br />' . "\n";
     //--  multiple account with same email
开发者ID:rhertzog,项目名称:lcs,代码行数:31,代码来源:campusProblem.php

示例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) {
开发者ID:helluvamatt,项目名称:Minecraft-Overviewer,代码行数:31,代码来源:player-avatar.php


注:本文中的Cache_Lite::lastModified方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。