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


PHP getlastmod函数代码示例

本文整理汇总了PHP中getlastmod函数的典型用法代码示例。如果您正苦于以下问题:PHP getlastmod函数的具体用法?PHP getlastmod怎么用?PHP getlastmod使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了getlastmod函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: autoCache

 public function autoCache($config = array())
 {
     $config = array_merge(array(match_etag => true, match_modified => true, last_modified => true, expires => true, etags => true, cache => true, gzip => false, maxAge => 1000), $config);
     $id = md5($html);
     $this->lastModified = getlastmod();
     $this->maxAge = $config["maxAge"] * 24 * 60 * 60;
     $this->expires = $this->lastModified + $this->maxAge;
     $this->etag = dechex($this->lastModified);
     $this->cacheControl = "must-revalidate, proxy-revalidate, max-age=" . $this->maxAge . ", s-maxage=" . $this->maxAge;
     if ($config["last_modified"]) {
         $this->setLastModifiedHeader();
     }
     if ($config["expires"]) {
         $this->setExpiresHeader();
     }
     if ($config["etags"]) {
         $this->setETagsHeader();
     }
     if ($config["cache"]) {
         $this->setCacheControlHeader();
     }
     if ($config["match_modified"] || $config["match_etag"]) {
         $this->getIfModified();
     }
     echo $html;
 }
开发者ID:eduardolundgren,项目名称:yfast,代码行数:26,代码来源:YFast.php

示例2: setupNavigation

function setupNavigation($data)
{
    global $NEXT, $PREV, $UP, $HOME, $TOC, $tstamp;
    $HOME = @$data["home"];
    $HOME[0] = "./";
    $NEXT = @$data["next"];
    $PREV = @$data["prev"];
    $UP = @$data["up"];
    $TOC = @$data["toc"];
    $tstamp = gmdate("D, d M Y", getlastmod());
}
开发者ID:phpsource,项目名称:web-pecl,代码行数:11,代码来源:pear-manual.php

示例3: setupNavigation

/**
 * Fills global variables with navigational links.
 *
 * @param array $data Array containing home, next, prev, up and toc keys.
 *
 * @return void
 */
function setupNavigation($data)
{
    global $NEXT, $PREV, $UP, $HOME, $TOC, $tstamp;
    $HOME = @$data['home'];
    $HOME[0] = './';
    $NEXT = @$data['next'];
    $PREV = @$data['prev'];
    $UP = @$data['up'];
    $TOC = @$data['toc'];
    $tstamp = gmdate('D, d M Y', getlastmod());
}
开发者ID:stof,项目名称:pearweb,代码行数:18,代码来源:pear-manual.php

示例4: __construct

 public function __construct()
 {
     $this->config = array('filename' => basename(__FILE__), 'username' => '', 'password' => '', 'interpreter' => 'shell_exec', 'current_user' => get_current_user(), 'hostname' => function_exists('gethostname') ? gethostname() : $_SERVER['HTTP_HOST'], 'server_address' => isset($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : '127.0.0.1', 'server_port' => $_SERVER['SERVER_PORT'], 'request_time' => $_SERVER['REQUEST_TIME'], 'php_owner_uid' => getmyuid(), 'php_owner_gid' => getmygid(), 'php_process_id' => getmypid(), 'inode_script' => getmyinode(), 'last_page_modification' => getlastmod(), 'cwd' => getcwd());
     if (isset($_SESSION['interpreter'])) {
         $this->config['interpreter'] = $_SESSION['interpreter'];
     }
     if (isset($_SESSION['cwd']) && $_SESSION['cwd'] != $this->config['cwd']) {
         chdir($_SESSION['cwd']);
         $this->config['cwd'] = getcwd();
     }
     $this->config['prompt'] = $this->get_prompt();
 }
开发者ID:jaggedsoft,项目名称:phpshellgen,代码行数:12,代码来源:template.php

示例5: getFiles

 function getFiles($path)
 {
     static $list;
     // Only process the list once per request
     if (is_array($list)) {
         return $list;
     }
     $path = JPath::clean($path, '/');
     $folder = JPath::check(JPATH_ROOT . '/' . $path);
     if (!is_readable($folder)) {
         return false;
     }
     $files = array();
     $folders = array();
     $docs = array();
     $extensions = array('jpg', 'png', 'gif', 'jpeg');
     // Get upload files if any
     include 'getuploads.php';
     // Iterate over the files if they exist
     foreach (JFolder::files($folder) as $file) {
         $extension = strtolower(pathinfo($folder . '/' . $file, PATHINFO_EXTENSION));
         if (!in_array($extension, $extensions)) {
             continue;
         }
         $tmp = new stdClass();
         $tmp->name = $file;
         $tmp->path = $path . '/' . $file;
         $tmp->url = JURI::root() . $path . '/' . $file;
         $tmp->size = filesize(JPATH_ROOT . '/' . $tmp->path);
         $tmp->date = date("Y-m-d H:i:s", getlastmod(JPATH_ROOT . '/' . $tmp->path));
         $tmp->isimage = true;
         $info = getimagesize(JPATH_ROOT . '/' . $tmp->path);
         $tmp->width = $info[0];
         $tmp->height = $info[1];
         $tmp->type = $info[2];
         $tmp->mime = $info['mime'];
         $tmp->thumbnailUrl = $this->getThumbnailUrl($tmp, 60, 60);
         $files[] = $tmp;
     }
     return $files;
 }
开发者ID:jputz12,项目名称:OneNow-Vshop,代码行数:41,代码来源:files.php

示例6: error_reporting

 *   2002-2005 PukiWiki Developers Team
 *   2001-2002 Originally written by yu-ji
 */
//error_reporting(0); // Nothing
error_reporting(E_ERROR | E_PARSE);
// Avoid E_WARNING, E_NOTICE, etc
ini_set('zlib.output_compression', 'Off');
// Style
$menubar = isset($_GET['menubar']) ? $_GET['menubar'] : '';
$expire = isset($_GET['expire']) ? (int) $_GET['expire'] * 86400 : '604800';
// Default is 7 days.
// Send header
header('Content-Type: text/css; charset: UTF-8');
header('Cache-Control: private');
header('Expires: ' . gmdate('D, d M Y H:i:s', time() + $expire) . ' GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s', getlastmod()) . ' GMT');
@ob_start('ob_gzhandler');
?>
/**************************************************************************************************/
/* anchor tag */
a:not(.btn):not([role="presentation"]) {
	color:#215dc6;
	background-color:inherit;
	text-decoration:none;
}

a:not(.btn):not([role="presentation"]):active {
	color:#215dc6 !important;
}

a:not(.btn):not([role="presentation"]):visited {
开发者ID:logue,项目名称:pukiwiki_adv,代码行数:31,代码来源:classic.css.php

示例7: date

 <div id="FOOTER"> 
  <p align="center"><img src="images/hr.gif" alt="" width="400" height="30"></p>
  <p><a href="http://indyslair.net/bishen/"><img src="images/button3.jpg" alt="Bishen Realm" width="88" height="31" border="0"></a></p>
  <p><?php 
echo "Page Last Modified on " . date("F d Y", getlastmod());
?>
<br>
    Bishel Dragons &copy;2001-<?php 
echo date("Y");
?>
 <a href="http://indyslair.net/bishen/">Indyana</a>.<br>
    Layout and Story <a href="/rhul/copyright.php">&copy;2003-<?php 
echo date("Y");
?>
</a> 
    <a href="/rhul/contact.php">Bright Promise</a>.</p>
</div></div></div>
</body>
</html>
开发者ID:rachelober,项目名称:elaria.landofrhul.com,代码行数:19,代码来源:footer.php

示例8: MAX

     $sql = 'SELECT MAX(UNIX_TIMESTAMP(`date`)) as `tstamp` FROM `' . $forum_table . "` WHERE `trash` = '0'";
 }
 $mod_db_time = 0;
 if (isset($sql)) {
     $res = mysql_query($sql);
     if (!$res) {
         die(mysql_error());
     }
     while ($row = mysql_fetch_array($res, MYSQL_ASSOC)) {
         $tmp_time = $row['tstamp'];
         $mod_db_time = $mod_db_time > $tmp_time ? $mod_db_time : $tmp_time;
     }
 }
 // modified time of this file
 $mod_cache_inc_file_time = filemtime($_SERVER['SCRIPT_FILENAME']) ? filemtime($_SERVER["SCRIPT_FILENAME"]) : filemtime($_SERVER['PATH_TRANSLATED']);
 $mod_parent_file_time = getlastmod();
 // modified time of the parent file
 $mod_file_time = $mod_cache_inc_file_time > $mod_parent_file_time ? $mod_cache_inc_file_time : $mod_parent_file_time;
 // get the latest
 $mod_time = $mod_file_time > $mod_db_time ? $mod_file_time : $mod_db_time;
 $mod_gmt = gmdate('D, d M Y H:i:s', $mod_time) . ' GMT';
 // convert to GMT format
 // if it is same with "if_modified_since" from request header, stop output
 if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])) {
     $if_modified_since = preg_replace('/;.*$/', '', $_SERVER['HTTP_IF_MODIFIED_SINCE']);
     if ($if_modified_since == $mod_gmt) {
         header($_SERVER['SERVER_PROTOCOL'] . ' 304 Not Modified');
         ob_end_clean();
         exit;
     }
 }
开发者ID:kaz6120,项目名称:P_BLOG,代码行数:31,代码来源:http_headers.inc.php

示例9: make_footer

function make_footer()
{
    ?>

<div class="search">
  <!-- Google CSE Search Box Begins  -->
  <form action="http://www.google.com/cse" id="cse-search-box">
    <input type="hidden" name="cx" value="012399064992308798676:e_bxmf5nqrq">
    <input type="text" name="q" size="25">
    <input type="submit" name="sa" value="Search">
  </form>
  <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script>
  <!-- Google CSE Search Box Ends -->
</div>

<hr>
<i>Site Created By:</i>
<!-- <a href="mailto:libmesh-users@lists.sourceforge.net">libMesh Developers</a><br> -->
<a href="http://libmesh.sourceforge.net/developers.php">libMesh Developers</a><br>
<?php 
    // Newer versions of PHP require you to set the default timezone or a warning message is printed
    date_default_timezone_set('UTC');
    ?>
<i><?php 
    echo "Last modified: " . date("F d Y H:i:s", getlastmod());
    echo " UTC";
    ?>
</i>

<br>
<br>
<i>Hosted By:</i>
<br>
<A href="http://sourceforge.net">
<IMG src="http://sourceforge.net/sflogo.php?group_id=71130&amp;type=1" width="88" height="31" border="0" alt="SourceForge.net Logo"></A>

<!-- Google Analytics stuff -->
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-24978333-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
									    
<?php 
}
开发者ID:GaZ3ll3,项目名称:libmesh,代码行数:53,代码来源:navigation.php

示例10: _finish_body

   protected function _finish_body()
   {
       $page = $this->page;
       $options = $page->template_options;
       $browser = $this->env->browser();
       if ($options->close_logger) {
           $this->env->logs->close_all();
       }
       ?>
   </div>
   <?php 
       if ($options->footer_visible && !$browser->is(Browser_previewer)) {
           ?>
   <div class="footer">
   <?php 
           /* Build the left side of the footer with the copyright and version info. */
           $lines = array();
           if ($options->show_links) {
               $lines[] = '<div class="footer-links">' . $this->_links_as_text($options) . '</div>';
           }
           if ($options->copyright) {
               $lines[] = '<div class="copyright">' . $options->copyright . '</div>';
           }
           if ($options->show_versions) {
               $lines[] = '<div class="versions">' . $this->_versions_as_text($options) . '</div>';
           }
           if ($options->show_last_time_modified) {
               $date = new DATE_TIME(getlastmod());
               $f = $date->formatter();
               $f->set_type_and_clear_flags(Date_time_format_short_date_and_time);
               $lines[] = '<div class="modification-time">Last modified on ' . $date->format($f) . '</div>';
           }
           if ($options->show_statistics) {
               $lines[] = '<div class="statistics">' . $this->_page_statistics_as_text($options) . '</div>';
           }
           echo '<div class="footer-data">';
           echo join('</div><div class="footer-data">', $lines);
           echo '</div>';
           $this->_handle_browser_warnings($options, false);
           ?>
   </div>
   <?php 
       }
       ?>
 </div>
 <?php 
       parent::_finish_body();
   }
开发者ID:mvonballmo,项目名称:earthli-webcore,代码行数:48,代码来源:default_page_renderer.php

示例11: Joom_Output

 function Joom_Output($file, $filename, $cache, $mime, $show, $image, $quali = 95)
 {
     //Writes header || Gibt den Header der neuen Bilddatei heraus
     header("Pragma: public");
     //Writes header information for caching || Gibt die Header Informationen fuer Dateien aus, die in den gecached werden duerfen
     if ($cache == 'cache') {
         header("Last-Modified: " . gmdate('D, d M Y H:i:s', getlastmod()) . " GMT");
         header("Cache-Control: public, max-age=3600");
         header("Cache-Control: pre-check=3600, FALSE");
         header("Expires: " . gmdate('D, d M Y H:i:s', time() + 3600) . " GMT ");
         //Writes header information for non caching || Gibt die Header Informationen fuer Dateien aus, die nicht gecached werden duerfen
     } else {
         header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
         header("Pragma: no-cache");
         header("Cache-Control: no-store, no-cache, max-age=0, must-revalidate");
         header("Cache-Control: post-check=0, pre-check=0, false");
         header('Expires: 0');
     }
     //header("Content-Transfer-Encoding: binary");
     if ($image == "file") {
         header("Content-Length: " . filesize($file));
         header("Accept-Ranges: bytes");
     }
     header("Content-type: {$mime}");
     header("Content-Disposition: {$show}; filename={$filename}");
     //Checks if file is a image to be generated with php || Ueberprueft ob die Datei ein Bild ist, das erst noch von PHP erzeugt werden muss
     if ($image == 'image') {
         switch ($mime) {
             case 'image/gif':
                 imagegif($file);
                 break;
             case 'image/png':
                 imagepng($file);
                 break;
             case 'image/jpeg':
                 imagejpeg($file, '', $quali);
                 break;
             default:
                 exit;
                 break;
         }
         imagedestroy($file);
     } else {
         readfile($file);
     }
     exit;
 }
开发者ID:planetangel,项目名称:Planet-Angel-Website,代码行数:47,代码来源:joom.specialimages.php

示例12: session_start

 session_start();
 header('Expires: ' . gmdate('D, d M Y H:i:s \\G\\M\\T', time() + 60 * 60 * 24 * 364));
 $page = isset($_GET['page']) ? $_GET['page'] : 'Home';
 $objUsr = new Sintax\Core\AnonymousUser();
 if (isset($_SESSION['usuario'])) {
     //$objUsr=$_SESSION['usuario'];
     $usrClass = get_class($_SESSION['usuario']);
     if ($usrClass != "__PHP_Incomplete_Class") {
         $objUsr = $_SESSION['usuario'];
     } else {
         unset($_SESSION['usuario']);
     }
 }
 /* css Js Libs ********************************************************************/
 $arrFilesModTime = array();
 $arrFilesModTime[$_SERVER['SCRIPT_FILENAME']] = getlastmod();
 //Fecha de modificacion del punto de entrada
 $arrFilesModTime[__FILE__] = filemtime(__FILE__);
 //Fecha de modificacion de este fichero
 $arrFilesModTime[SKEL_ROOT_DIR . "includes/server/start.php"] = filemtime(SKEL_ROOT_DIR . "includes/server/start.php");
 ob_start();
 foreach ($ARR_CLIENT_LIBS as $libPath) {
     $arrFilesModTime[$libPath] = filemtime($libPath);
     require $libPath;
 }
 $cssLinkTags = ob_get_clean();
 if ($cssLinkTags != "") {
     $hrefs = array();
     try {
         $doc = new DOMDocument();
         $doc->loadHTML($cssLinkTags);
开发者ID:neslonso,项目名称:Sintax,代码行数:31,代码来源:css.php

示例13: load_skin

 * @reference
 * @license http://www.gnu.org/copyleft/lesser.txt GNU Lesser General Public License
 */
// common definitions and initial processing
include_once '../shared/global.php';
// load localized strings
i18n::bind('codes');
// load the skin
load_skin('codes');
// the path to this page
$context['path_bar'] = array('help/' => i18n::s('Help index'), 'codes/' => i18n::s('Formatting Codes'));
// the title of the page
$context['page_title'] = i18n::s('In-line formatting codes');
// the date of last modification
if (Surfer::is_associate()) {
    $context['page_details'] .= '<p class="details">' . sprintf(i18n::s('Edited %s'), Skin::build_date(getlastmod())) . '</p>';
}
// page header
$context['text'] .= '<p>' . i18n::s('On this page we are introducing some formatting codes and live examples of utilization.') . '</p>';
// add a toc
$context['text'] .= "\n" . '[toc]' . "\n";
// **...**
$context['text'] .= '[title]' . i18n::s('Wiki bold') . ' [escape]**...**[/escape][/title]' . Skin::table_prefix('wide') . Skin::table_row(array(i18n::s('Example'), i18n::s('Rendering')), 'header') . '<tr><td class="sample">[escape]' . i18n::s('This is very **important**, isn\'t it?') . '[/escape]</td>' . '<td>' . i18n::s('This is very **important**, isn\'t it?') . '</td></tr>' . Skin::table_suffix();
// [b]...[/b]
$context['text'] .= '[title]' . i18n::s('Bold') . ' [escape][b]...[/b][/escape][/title]' . Skin::table_prefix('wide') . Skin::table_row(array(i18n::s('Example'), i18n::s('Rendering')), 'header') . '<tr><td class="sample">[escape]' . i18n::s('This is very [b]important[/b], isn\'t it?') . '[/escape]</td>' . '<td>' . i18n::s('This is very [b]important[/b], isn\'t it?') . '</td></tr>' . Skin::table_suffix();
// //...//
$context['text'] .= '[title]' . i18n::s('Wiki italics') . '  [escape]//...//[/escape][/title]' . Skin::table_prefix('wide') . Skin::table_row(array(i18n::s('Example'), i18n::s('Rendering')), 'header') . '<tr><td class="sample">[escape]' . i18n::s('This is really //meaningful//!') . '[/escape]</td>' . '<td>' . i18n::s('This is really //meaningful//!') . '</td></tr>' . Skin::table_suffix();
// [i]...[/i]
$context['text'] .= '[title]' . i18n::s('Italics') . '	[escape][i]...[/i][/escape][/title]' . Skin::table_prefix('wide') . Skin::table_row(array(i18n::s('Example'), i18n::s('Rendering')), 'header') . '<tr><td class="sample">[escape]' . i18n::s('This is really [i]meaningful[/i]!') . '[/escape]</td>' . '<td>' . i18n::s('This is really [i]meaningful[/i]!') . '</td></tr>' . Skin::table_suffix();
// __...__
$context['text'] .= '[title]' . i18n::s('Wiki underline') . '  [escape]__...__[/escape][/title]' . Skin::table_prefix('wide') . Skin::table_row(array(i18n::s('Example'), i18n::s('Rendering')), 'header') . '<tr><td class="sample">[escape]' . i18n::s('I would like to __insist__ on this point...') . '[/escape]</td>' . '<td>' . i18n::s('I would like to __insist__ on this point...') . '</td></tr>' . Skin::table_suffix();
开发者ID:rair,项目名称:yacs,代码行数:31,代码来源:basic.php

示例14: ubbcode

 function ubbcode()
 {
     $this->call_time = 0;
     $this->sLastModified = sprintf("%s", date("Y-m-j H:i", getlastmod()));
 }
开发者ID:TiMoChao,项目名称:xingfu,代码行数:5,代码来源:ubbcode.class.php

示例15: strftime

  </table>
		</td>
  </tr>
  <tr> 
    <td colspan="2"> <hr> </td>
  </tr>
  <tr> 
    <td valign="top"> <div class="footer"> Copyright &copy; 2002 <a href=
              "mailto:cchapin@chipchapin.com?subject=<?php 
echo $pgEmailSubj;
?>
">Chip 
        Chapin</a>,� <a href=
              "http://www.chipchapin.com/" target="_blank">http://www.chipchapin.com</a> 
      </div></td>
    <td align="right"> <div class="date"> 
        Updated 
<?php 
echo strftime("%A %B %d, %Y %T %Z", getlastmod());
if (false) {
    ?>
        <!-- #BeginDate format:Am1 -->December 2, 2002<!-- #EndDate -->
<?php 
}
?>
      </div></td>
  </tr>
</table>
<p>&nbsp;</p>
</body>
<!-- InstanceEnd --></html>
开发者ID:maroend,项目名称:protocolos,代码行数:31,代码来源:index.php


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