100+ results for 'php filemtime'

Not the results you expected?

xhprof_runs.php (https://gitlab.com/tjaafar/SuiteCRM) PHP · 166 lines

1 <?php

2 if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');

3 //

126 public function save_run($xhprof_data, $type, $run_id = null) {

127

128 // Use PHP serialize function to store the XHProf's

129 // raw profiler data.

130 $xhprof_data = serialize($xhprof_data);

152 echo "<hr/>Existing runs:\n<ul>\n";

153 $files = glob("{$this->dir}/*.{$this->suffix}");

154 usort($files, create_function('$a,$b', 'return filemtime($b) - filemtime($a);'));

155 foreach ($files as $file) {

156 list($run,$source) = explode('.', basename($file));

159 . htmlentities($source) . '">'

160 . htmlentities(basename($file)) . "</a><small> "

161 . date("Y-m-d H:i:s", filemtime($file)) . "</small></li>\n";

162 }

163 echo "</ul>\n";

squeeze.php (https://github.com/ratbird/hope.git) PHP · 138 lines

1 <?php

2

3 /*

48 }

49

50 $config_time = filemtime($configFile);

51

52 foreach ($configuration['css'] as $package => $files) {

54 $src = $configuration['assets_root'] . '/stylesheets/' . $file;

55 $dest = $configuration['package_path'] . '/' . $package . '-' . $file;

56 if (!file_exists($dest) || (max($config_time, filemtime($src)) > filemtime($dest))) {

57 $contents = file_get_contents($src);

58 if ($compress) {

settings.yml (https://github.com/uzura8/OpenPNE3.git) YAML · 108 lines

10 dev:

11 .settings:

12 error_reporting: <?php echo (E_ALL)."\n" ?>

13 web_debug: true

14 cache: false

18 test:

19 .settings:

20 error_reporting: <?php echo ((E_ALL) ^ E_NOTICE)."\n" ?>

21 cache: false

22 web_debug: false

27 .settings:

28 # Form security secret (CSRF protection)

29 csrf_secret: <?php sfConfig::has('op_csrf_secret') ? print sfConfig::get('op_csrf_secret') : print filemtime(__FILE__)."\n" ?> # Unique secret to enable CSRF protection or false to disable

30

31 # Output escaping settings

52 i18n: on # Enable interface translation. Set to off if your application should not be translated.

53 # check_symfony_version: off # Enable check of symfony version for every request. Set to on to have symfony clear the cache automatically when the framework is upgraded. Set to off if you always clear the cache after an upgrade.

54 # compressed: off # Enable PHP response compression. Set to on to compress the outgoing HTML via the PHP handler.

55 # check_lock: off # Enable the application lock system triggered by the clear-cache and disable tasks. Set to on to have all requests to disabled applications redirected to the $sf_symfony_data_dir/web/errors/unavailable.php page.

admin.php (https://github.com/joechen2010/steal.git) PHP · 127 lines

1 <?php

2 !function_exists('html') && exit('ERR');

3

4 if(is_file(ROOT_PATH."cache/crontab.php")&&!is_writable(ROOT_PATH."cache/crontab.php")){

5 showerr('�ļ�����д/cache/crontab.php,�޷�ִ�ж�ʱ����');

15 }

16 elseif($job == "list"&& $Apower[crontab]){

17 if(time()-@filemtime(ROOT_PATH.'cache/crontab.php')>120){unlink(ROOT_PATH.'cache/crontab.php');}

18 $query = $db->query("SELECT * FROM {$pre}crontab ORDER BY id ASC");

19 while($rs = $db->fetch_array($query)){

20 $rs[ifstop] = $rs[ifstop] ? "<a href='index.php?lfj=crontab&act=open&id=$rs[id]' style='color:#999'>�ر�</a>" : "<a href='index.php?lfj=crontab&act=close&id=$rs[id]' style='color:red'>����</a>" ;

21 if($rs[daytime]){

22 $daytimea = substr($rs[daytime],0,2);

cache.php (https://github.com/eosc/EosC-2.3.git) PHP · 160 lines

1 <?php

2 /*

3 $Id: cache.php,v 1.11 2003/07/01 14:34:54 hpdl Exp $

47 if (($auto_expire == true) && file_exists($filename)) {

48 $now = time();

49 $filetime = filemtime($filename);

50 $difference = $now - $filetime;

51

105 if (($refresh == true) || !read_cache($cache_output, 'categories_box-' . $language . '.cache' . $cPath, $auto_expire)) {

106 ob_start();

107 include(DIR_WS_BOXES . 'categories.php');

108 $cache_output = ob_get_contents();

109 ob_end_clean();

129 if (($refresh == true) || !read_cache($cache_output, 'manufacturers_box-' . $language . '.cache' . $manufacturers_id, $auto_expire)) {

130 ob_start();

131 include(DIR_WS_BOXES . 'manufacturers.php');

132 $cache_output = ob_get_contents();

133 ob_end_clean();

BaseProvider.php (https://github.com/freescout-helpdesk/freescout.git) PHP · 360 lines

1 <?php namespace Devfactory\Minify\Providers;

2

3 use Devfactory\Minify\Exceptions\CannotRemoveFileException;

302 }

303 else {

304 $time += filemtime($file);

305 }

306 }

class-archive.php (https://gitlab.com/billyprice1/h5ai) PHP · 183 lines

1 <?php

2

3 class Archive {

29

30 if (count($this->dirs) === 0 && count($this->files) === 0) {

31 if ($type === 'php-tar') {

32 $this->add_dir($this->base_path, '/');

33 } else {

74

75 foreach ($dirs as $real_dir => $archived_dir) {

76 echo $this->php_tar_header($archived_dir, 0, @filemtime($real_dir . DIRECTORY_SEPARATOR . "."), 5);

77 }

78

80 $size = $filesizes[$real_file];

81

82 echo $this->php_tar_header($archived_file, $size, @filemtime($real_file), 0);

83 $this->print_file($real_file);

84

rsslib.php (https://github.com/burningTyger/os_moodle.git) PHP · 168 lines

1 <?php

2 //This file adds support to rss feeds generation

3

43 $cachedfilelastmodified = 0;

44 if (file_exists($cachedfilepath)) {

45 $cachedfilelastmodified = filemtime($cachedfilepath);

46 }

47 //if the cache is more than 60 seconds old and there's new stuff

70

71 $item->pubdate = $rec->entrytimecreated;

72 $item->link = $CFG->wwwroot."/mod/glossary/showentry.php?courseid=".$glossary->course."&eid=".$rec->entryid;

73

74 $definition = file_rewrite_pluginfile_urls($rec->entrydefinition, 'pluginfile.php',

80 //First all rss feeds common headers

81 $header = rss_standard_header(format_string($glossary->name,true),

82 $CFG->wwwroot."/mod/glossary/view.php?g=".$glossary->id,

83 format_string($glossary->intro,true));

84 //Now all the rss items

CacheDependency.php (https://gitlab.com/link233/bootmw) PHP · 265 lines

1 <?php

2 /**

3 * Data caching with dependencies.

185 # Dependency on a non-existent file stores "false"

186 # This is a valid concept!

187 $this->timestamp = filemtime( $this->filename );

188 MediaWiki\restoreWarnings();

189 }

195 function isExpired() {

196 MediaWiki\suppressWarnings();

197 $lastmod = filemtime( $this->filename );

198 MediaWiki\restoreWarnings();

199 if ( $lastmod === false ) {

DirectoryBaker.php (https://github.com/hdonnay/site.git) PHP · 174 lines

1 <?php

2

3 namespace PieCrust\Baker;

36 null :

37 function ($p) use ($processorsToFilter) { return in_array($p->getName(), $processorsToFilter); },

38 'SimpleFileProcessor.php'

39 );

40 foreach ($this->processorsLoader->getPlugins() as $proc)

139 {

140 $destination = $destinationDir . $f;

141 if (!is_file($destination) or $i->getMTime() >= filemtime($destination))

142 {

143 $isUpToDate = false;

153 $start = microtime(true);

154 $fileProcessor->process($i->getPathname(), $destinationDir);

155 echo PieCrustBaker::formatTimed($start, $relative) . PHP_EOL;

156 }

157 catch (Exception $e)

BinaryFile.php (https://bitbucket.org/wirbelwild/kiwa-core.git) PHP · 215 lines

1 <?php

2

3 /**

73 $this->mimeType = $mimeTypes[0] ?? 'application/octet-stream';

74

75 if (false !== $lastModified = DateTime::createFromFormat('U', (string) filemtime($file))) {

76 $this->lastModified = $lastModified;

77 }

129 $kiwa = self::$controller;

130

131 if (false !== strpos($file, '.php')) {

132 try {

133 ob_start();

136 } catch (Exception $exception) {

137 $output = (string) $exception;

138 $output.= PHP_EOL.PHP_EOL;

139 $output.= ob_get_clean();

140 }

JsCollectionOptimizer.php (https://gitlab.com/reasonat/support) PHP · 190 lines

1 <?php

2

3 namespace Drupal\Core\Asset;

181 $delete_stale = function($uri) {

182 // Default stale file threshold is 30 days.

183 if (REQUEST_TIME - filemtime($uri) > \Drupal::config('system.performance')->get('stale_file_threshold')) {

184 file_unmanaged_delete($uri);

185 }

PugJsEngine.php (https://github.com/welaika/wordless.git) PHP · 248 lines

1 <?php

2

3 namespace Pug\Engine;

4

5 use NodejsPhpFallback\NodejsPhpFallback;

6

7 /**

11 {

12 /**

13 * @var NodejsPhpFallback

14 */

15 protected $nodeEngine;

116 {

117 return file_exists($renderFile) && (

118 filemtime($renderFile) >= filemtime($filename) ||

119 !$pug->getDefaultOption('upToDateCheck')

120 );

smarty_internal_config.php (https://bitbucket.org/makarewicz/galeria.git) PHP · 302 lines

1 <?php

2 /**

3 * Smarty Internal Plugin Config

52 public $compiled_filepath = null;

53 /**

54 * Filemtime of compiled config Filemtime

55 *

56 * @var int

118 }

119 $_compile_dir = $this->smarty->getCompileDir();

120 return $_compile_dir . $_filepath . '.' . basename($this->source->name) . '.config' . '.php';

121 }

122

129 {

130 return $this->compiled_timestamp === null

131 ? ($this->compiled_timestamp = (file_exists($this->getCompiledFilepath())) ? filemtime($this->getCompiledFilepath()) : false)

132 : $this->compiled_timestamp;

133 }

Filesystem.php (https://gitlab.com/jatasya/Slim_framework) PHP · 239 lines

1 <?php

2

3 /*

164 public function isFresh($name, $time)

165 {

166 return filemtime($this->findTemplate($name)) <= $time;

167 }

168

ArrayCache.php (https://github.com/phpMv/ubiquity.git) PHP · 202 lines

1 <?php

2 namespace Ubiquity\cache\system;

3

8

9 /**

10 * This class is responsible for storing Arrays in PHP files.

11 * Ubiquity\cache\system$ArrayCache

12 * This class is part of Ubiquity

22 * @var string The PHP opening tag (used when writing cache files)

23 */

24 const PHP_TAG = "<?php\n";

25

26 /**

65 $content = $code;

66 if (\is_array($code)) {

67 $content = self::PHP_TAG . 'return ' . UArray::asPhpArray($code, 'array') . ";\n";

68 }

69 $path = $this->_getPath($key);

DataCache.php (https://github.com/bshelton229/Kurogo-Mobile-Web.git) PHP · 253 lines

1 <?php

2

3 class DataCache

116 $path = $this->getFullPath($key);

117 if (is_readable($path)) {

118 return filemtime($path);

119 } else {

120 return null;

Homebanners.php (https://gitlab.com/gomix/magento-1.9) PHP · 156 lines

1 <?php

2 /**

3 * Magento

8 * that is bundled with this package in the file LICENSE.txt.

9 * It is also available through the world-wide-web at this URL:

10 * http://opensource.org/licenses/osl-3.0.php

11 * If you did not receive a copy of the license and are unable to

12 * obtain it through the world-wide-web, please send an email

22 * @package Mage_XmlConnect

23 * @copyright Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)

24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

25 */

26

85

86 $itemXmlObj->addCustomChild('image', $bannerUrl, array(

87 'modification_time' => filemtime($originalFile)

88 ));

89 $this->_addImageAction($itemXmlObj, $bannerImage['image_id']);

view.php (https://bitbucket.org/tumivn/phpexamples.git) PHP · 437 lines

1 <?php

2 /**

3 *

4 * @View Class

5 *

6 * @copyright Copyright (C) 2009 PHPRO.ORG. All rights reserved.

7 *

8 * @license new bsd http://www.opensource.org/licenses/bsd-license.php

295 {

296 clearstatcache();

297 if (filemtime($filename) > (time() - $this->cache_lifetime))

298 {

299 $isCached = true;

rsscache.class.php (https://github.com/JoeBlow/revolution.git) PHP · 203 lines

1 <?php

2 /**

3 * @package modx

122 // find how long ago the file was added to the cache

123 // and whether that is longer then MAX_AGE

124 $mtime = filemtime( $filename );

125 $age = time() - $mtime;

126 if ( $this->MAX_AGE > $age ) {

143 $filename = $this->file_name( $url );

144 if ( file_exists( $filename ) ) {

145 $mtime = filemtime( $filename );

146 $age = time() - $mtime;

147 return $age;

182 \*=======================================================================*/

183 function error ($errormsg, $lvl=E_USER_WARNING) {

184 // append PHP's error message if track_errors enabled

185 if ( isset($php_errormsg) ) {

function.php (https://bitbucket.org/SalesPaddockApp/salespaddock_admin.git) PHP · 101 lines

43 if($file_style == "block") { ?>

44 <div class="fileDiv"

45 onclick="showEditBar('<?php echo $image_url; ?>','<?php echo $image_height; ?>','<?php echo $count; ?>','<?php echo $image_basename; ?>');"

46 ondblclick="showImage('<?php echo $image_url; ?>','<?php echo $image_height; ?>','<?php echo $image_basename; ?>');"

48 <div class="imgDiv"><img class="fileImg lazy" data-original="<?php echo $image_url; ?>"></div>

49 <p class="fileDescription"><span class="fileMime"><?php echo $image_extension; ?></span> <?php echo $image_filename; ?><?php if($file_extens == "yes"){echo ".$image_extension";} ?></p>

50 <p class="fileTime"><?php echo date ("F d Y H:i", filemtime($image)); ?></p>

53 <?php } elseif($file_style == "list") { ?>

54 <div class="fullWidthFileDiv"

55 onclick="showEditBar('<?php echo $image_url; ?>','<?php echo $image_height; ?>','<?php echo $count; ?>','<?php echo $image_basename; ?>');"

56 ondblclick="showImage('<?php echo $image_url; ?>','<?php echo $image_height; ?>','<?php echo $image_basename; ?>');"

66 <p class="fullWidthfileTime"><?php echo $filesizetemp; ?> KB</p>

67 <p class="fullWidthfileTime fullWidth30percent"><?php echo date ("F d Y H:i", filemtime($image)); ?></p>

68 </div>

69 <?php }

Homebanners.php (https://github.com/cosmocommerce/magento-mirror.git) PHP · 156 lines

1 <?php

2 /**

3 * Magento

8 * that is bundled with this package in the file LICENSE.txt.

9 * It is also available through the world-wide-web at this URL:

10 * http://opensource.org/licenses/osl-3.0.php

11 * If you did not receive a copy of the license and are unable to

12 * obtain it through the world-wide-web, please send an email

22 * @package Mage_XmlConnect

23 * @copyright Copyright (c) 2014 Magento Inc. (http://www.magentocommerce.com)

24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

25 */

26

85

86 $itemXmlObj->addCustomChild('image', $bannerUrl, array(

87 'modification_time' => filemtime($originalFile)

88 ));

89 $this->_addImageAction($itemXmlObj, $bannerImage['image_id']);

modscript.class.php (https://github.com/hatone/revolution.git) PHP · 174 lines

1 <?php

2 /**

3 * @package modx

4 */

5 /**

6 * An element representing executable PHP script content.

7 *

8 * {@inheritdoc}

38 if (strncmp($v, '<?', 2) == 0) {

39 $v= substr($v, 2);

40 if (strncmp($v, 'php', 3) == 0) $v= substr($v, 3);

41 }

42 if (substr($v, -2, 2) == '?>') $v= substr($v, 0, -2);

123 */

124 public function loadScript() {

125 $includeFilename = $this->xpdo->getCachePath() . 'includes/' . $this->getScriptCacheKey() . '.include.cache.php';

126 $result = file_exists($includeFilename);

127 $outdated = false;

smarty_internal_config.php (https://github.com/raphaelbastide/berta.git) PHP · 270 lines

1 <?php

2 /**

3 * Smarty Internal Plugin Config

44 {

45 return $this->config_timestamp === null ?

46 $this->config_timestamp = filemtime($this->getConfigFilepath()) :

47 $this->config_timestamp;

48 }

150 $_compile_dir .= DS;

151 }

152 return $_compile_dir . $_filepath . '.' . basename($this->config_resource_name) . '.config' . '.php';

153 }

154 /**

160 {

161 return $this->compiled_timestamp === null ?

162 ($this->compiled_timestamp = (file_exists($this->getCompiledFilepath())) ? filemtime($this->getCompiledFilepath()) : false) :

163 $this->compiled_timestamp;

164 }

cache.php (https://github.com/vaughnpaul/NOS.git) PHP · 245 lines

1 <?php

2 /*

3 $Id: cache.php,v 1.2 2008/06/23 00:18:17 datazen Exp $

41 if (($auto_expire == true) && file_exists($filename)) {

42 $now = time();

43 $filetime = filemtime($filename);

44 $difference = $now - $filetime;

45 if ($difference >= $auto_expire) {

95 define(TEMPLATE_NAME, 'default');

96 }

97 // set all possible catagories X.php names

98 ob_start();

99 include(DIR_WS_TEMPLATES . TEMPLATE_NAME . '/boxes/categories.php');

120 define(TEMPLATE_NAME, 'default');

121 }

122 //set all possible catagories X.php names

123 ob_start();

124 include(DIR_WS_TEMPLATES . TEMPLATE_NAME . '/boxes/categories1.php');

cache.lib.php (https://gitlab.com/BGCX261/zhou3liu-svn-to-git.git) PHP · 223 lines

1 <?php

2

3 /**

56

57 /**

58 * 普通PHP文件缓存

59 *

60 * @author Garbin

61 * @usage none

62 */

63 class PhpCacheServer extends CacheServer

64 {

65 /* 缓存目录 */

72 }

73 $cache_file = $this->_get_cache_path($key);

74 $cache_data = "<?php\r\n/**\r\n * @Created By ECMall PhpCacheServer\r\n * @Time:" . date('Y-m-d H:i:s') . "\r\n */";

75 $cache_data .= $this->_get_expire_condition(intval($ttl));

76 $cache_data .= "\r\nreturn " . var_export($value, true) . ";\r\n";

DependencyChecker.php (https://bitbucket.org/devpronitzz/healthcase.git) PHP · 176 lines

73 $files = @array_map('filemtime', array_combine($files, $files)); // @ - file may not exist

74 $phpFiles = @array_map('filemtime', array_combine($phpFiles, $phpFiles)); // @ - file may not exist

75 return [self::VERSION, $files, $phpFiles, $classes, $functions, $hash];

83 public static function isExpired($version, $files, &$phpFiles, $classes, $functions, $hash)

84 {

85 $current = @array_map('filemtime', array_combine($tmp = array_keys($files), $tmp)); // @ - files may not exist

86 $origPhpFiles = $phpFiles;

87 $phpFiles = @array_map('filemtime', array_combine($tmp = array_keys($phpFiles), $tmp)); // @ - files may not exist

88 return $version !== self::VERSION

89 || $files !== $current

90 || ($phpFiles !== $origPhpFiles && $hash !== self::calculateHash($classes, $functions));

91 }

92

Cache_File.php (https://gitlab.com/karlen/ayo_wp) PHP · 455 lines

1 <?php

2 namespace W3TC;

3

116 $expires_at = time() + $expire;

117 @fputs( $fp, pack( 'L', $expires_at ) );

118 @fputs( $fp, '<?php exit; ?>' );

119 @fputs( $fp, @serialize( $var ) );

120 @fclose( $fp );

296

297 if ( file_exists( $path ) ) {

298 return @filemtime( $path );

299 }

300

314 $hash = md5( $key );

315

316 $path = sprintf( '%s/%s/%s.php', substr( $hash, 0, 3 ), substr( $hash, 3, 3 ), $hash );

317

318 return $path;

Page.php (https://bitbucket.org/ndj/piecrust.git) PHP · 414 lines

1 <?php

2

3 namespace PieCrust\Page;

118 $this->date = strtotime($dateFromConfig);

119 else if ($this->date === null)

120 $this->date = filemtime($this->path);

121

122 // Add/adjust the time of day if needed.

Cache.php (https://gitlab.com/kubinos/writeoff) PHP · 376 lines

1 <?php

2

3 /**

156 if (isset($dp[self::FILES])) {

157 foreach (array_unique((array) $dp[self::FILES]) as $item) {

158 $dp[self::CALLBACKS][] = [[__CLASS__, 'checkFile'], $item, @filemtime($item)]; // @ - stat may fail

159 }

160 unset($dp[self::FILES]);

371 private static function checkFile($file, $time)

372 {

373 return @filemtime($file) == $time; // @ - stat may fail

374 }

375

project_submission.php (https://github.com/cmerlo441/Open-Course-Software.git) PHP · 131 lines

1 <?php

2

3 $title_stub = 'Project Submission';

68 } else if( substr( $upload[ 'filename' ], -3, 3 ) == '.js' ) {

69 print "<pre class=\"brush:js\">";

70 } else if( substr( $upload[ 'filename' ], -4, 4 ) == '.php' ) {

71 print "<pre class=\"brush:php\">";

112

113 $('span.grade').editInPlace({

114 url: 'update_grade.php',

115 default_text: '(No grade recorded yet)',

116 params: "ajax=yes&assignment_id=<?php echo $assignment; ?>",

117 saving_image: "<?php echo $docroot; ?>/images/ajax-loader.gif"

118 })

119

modscript.class.php (https://github.com/christianhanvey/revolution.git) PHP · 176 lines

1 <?php

2 /**

3 * @package modx

4 */

5 /**

6 * An element representing executable PHP script content.

7 *

8 * {@inheritdoc}

38 if (strncmp($v, '<?', 2) == 0) {

39 $v= substr($v, 2);

40 if (strncmp($v, 'php', 3) == 0) $v= substr($v, 3);

41 }

42 if (substr($v, -2, 2) == '?>') $v= substr($v, 0, -2);

124 */

125 public function loadScript() {

126 $includeFilename = $this->xpdo->getCachePath() . 'includes/' . $this->getScriptCacheKey() . '.include.cache.php';

127 $result = is_readable($includeFilename);

128 $outdated = false;

File.php (https://github.com/mhayden/lucid.git) PHP · 196 lines

1 <?php

2 /*

3 Copyright (c) 2004-2008, The Dojo Foundation & Lucid Contributors

111 }

112 else if(is_file($f)) {

113 $r["modified"] = date ("F d Y H:i:s.", filemtime($f));

114 $r["type"] = mime_content_type($f);

115 if($r["type"] == false) { $r["type"] = mime_content_type_alt($f); }

class.wsdlcache.php (https://gitlab.com/endomorphosis/reservationtelco) PHP · 209 lines

1 <?php

2 /*

3 The NuSOAP project home is:

13 * @author Scott Nichol <snichol@users.sourceforge.net>

14 * @author Ingo Fischer <ingo@apollon.de>

15 * @version $Id: class.wsdlcache.php,v 1.7 2007/04/17 16:34:03 snichol Exp $

16 * @access public

17 */

84 // check for expired WSDL that must be removed from the cache

85 if ($this->cache_lifetime > 0) {

86 if (file_exists($filename) && (time() - filemtime($filename) > $this->cache_lifetime)) {

87 unlink($filename);

88 $this->debug("Expired $wsdl ($filename) from cache");

extension.cache.mysql.php (https://gitlab.com/x33n/ampache) PHP · 190 lines

1 <?php

2 /////////////////////////////////////////////////////////////////

3 /// getID3() by James Heinrich <info@getid3.org> //

7 /////////////////////////////////////////////////////////////////

8 // //

9 // extension.cache.mysql.php - part of getID3() //

10 // Please see readme.txt for more information //

11 // ///

22 * way as the getID3 class, but return cached information very fast

23 *

24 * Example: (see also demo.cache.mysql.php in /demo/)

25 *

26 * Normal getID3 usage (example):

27 *

28 * require_once 'getid3/getid3.php';

29 * $getID3 = new getID3;

30 * $getID3->encoding = 'UTF-8';

ClassCollectionLoader.php (https://bitbucket.org/wayfarer/verse.git) PHP · 129 lines

1 <?php

2 namespace Symfony\Component\ClassLoader;

3 class ClassCollectionLoader

4 {

5 static private $loaded;

6 static public function load($classes, $cacheDir, $name, $autoReload, $adaptive = false, $extension = '.php')

7 {

8 if (isset(self::$loaded[$name])) {

21 $reload = true;

22 } else {

23 $time = filemtime($cache);

24 $meta = unserialize(file_get_contents($metadata));

25 if ($meta[1] != $classes) {

27 } else {

28 foreach ($meta[0] as $resource) {

29 if (!is_file($resource) || filemtime($resource) > $time) {

30 $reload = true;

31 break;

FileHandlerPhp.php (https://github.com/szeber/yapep_base.git) PHP · 286 lines

1 <?php

2 declare(strict_types=1);

3

8 use YapepBase\File\Exception\NotFoundException;

9

10 class FileHandlerPhp implements IFileHandler

11 {

12 public function touch(string $path, int $modificationTime = 0, int $accessTime = 0): void

208 $this->requirePathToExist($path);

209

210 $result = filemtime($path);

211

212 if ($result === false) {

File.php (https://bitbucket.org/mad3linux/bigbox.git) PHP · 247 lines

1 <?php

2 /*

3 * Copyright 2008 Google Inc.

59

60 if ($expiration) {

61 $mtime = filemtime($storageFile);

62 if ((time() - $mtime) >= $expiration) {

63 $this->log(

smarty_internal_cacheresource_file.php (https://gitlab.com/adamlwalker/generatedata) PHP · 264 lines

1 <?php

2 /**

3 * Smarty Internal Plugin CacheResource File

61 $cached->lock_id = $_lock_dir.sha1($_cache_id.$_compile_id.$_template->source->uid).'.lock';

62 }

63 $cached->filepath = $_cache_dir . $_cache_id . $_compile_id . $_filepath . '.' . basename($_source_file_path) . '.php';

64 $cached->timestamp = @filemtime($cached->filepath);

74 public function populateTimestamp(Smarty_Template_Cached $cached)

75 {

76 $cached->timestamp = @filemtime($cached->filepath);

77 $cached->exists = !!$cached->timestamp;

78 }

101 {

102 if (Smarty_Internal_Write_File::writeFile($_template->cached->filepath, $content, $_template->smarty) === true) {

103 $_template->cached->timestamp = filemtime($_template->cached->filepath);

104 $_template->cached->exists = !!$_template->cached->timestamp;

105 return true;

view_details.php (https://github.com/dingwen/ZenHouse-Media-Template.git) PHP · 136 lines

1 <?php

2 /*

3 PDW File Browser v1.0 beta

26 */

27

28 require_once('functions.php');

29

30 if(isset($_REQUEST["ajax"])){

58 $filename = DOCUMENTROOT.$selectedpath.$key;

59 $image_info = getimagesize($filename);

60 $file_modified = date($datetimeFormat, filemtime($filename));

61 $file_size = filesize($filename);

62 $file_size = $file_size < 1024 ? $file_size. ' bytes' : $file_size < 1048576 ? number_format($file_size / 1024, 2, $dec_seperator, $thousands_separator) . ' kB' : number_format($file_size / 1048576, 2, $dec_seperator, $thousands_separator) . ' MB';

84

85 $filename = DOCUMENTROOT.$selectedpath.$key;

86 $file_modified = date($datetimeFormat, filemtime($filename));

87 $file_size = filesize($filename);

88 $file_type = mime_content_type($filename);

DirectFilesystem.php (https://github.com/ChuguluGames/mediawiki-svn.git) PHP · 500 lines

1 <?php

2

3 /**

4 * File holding the DirectFilesystem class.

5 *

6 * @file DirectFilesystem.php

7 * @ingroup Deployment

8 * @ingroup Filesystem

16

17 /**

18 * Filesystem class for direct PHP file and folder manipulation.

19 *

20 * @author Jeroen De Dauw

280 public function getModificationTime( $file ) {

281 wfSuppressWarnings();

282 $result = filemtime( $file );

283 wfRestoreWarnings();

284 return $result;

file.php (https://github.com/enygma/fuel.git) PHP · 274 lines

1 <?php

2 /**

3 * Fuel

4 *

5 * Fuel is a fast, lightweight, community driven PHP5 framework.

6 *

7 * @package Fuel

134 if (file_exists($file = static::$path.$dep.'.cache'))

135 {

136 $filemtime = filemtime($file);

137 if ($filemtime === false || $filemtime > $this->created)

140 elseif (file_exists($dep))

141 {

142 $filemtime = filemtime($file);

143 if ($filemtime === false || $filemtime > $this->created)

smarty_internal_cacheresource_file.php (https://github.com/GuessWho/don-t-enter.git) PHP · 259 lines

1 <?php

2 /**

3 * Smarty Internal Plugin CacheResource File

61 $cached->lock_id = $_lock_dir.sha1($_cache_id.$_compile_id.$_template->source->uid).'.lock';

62 }

63 $cached->filepath = $_cache_dir . $_cache_id . $_compile_id . $_filepath . '.' . basename($_source_file_path) . '.php';

64 Smarty::muteExpectedErrors();

65 $cached->timestamp = @filemtime($cached->filepath);

77 {

78 Smarty::muteExpectedErrors();

79 $cached->timestamp = @filemtime($cached->filepath);

80 Smarty::unmuteExpectedErrors();

81 $cached->exists = !!$cached->timestamp;

105 {

106 if (Smarty_Internal_Write_File::writeFile($_template->cached->filepath, $content, $_template->smarty) === true) {

107 $_template->cached->timestamp = filemtime($_template->cached->filepath);

108 $_template->cached->exists = !!$_template->cached->timestamp;

109 return true;

Filesystem.php (https://gitlab.com/mdabutaleb/sentinel) PHP · 464 lines

1 <?php

2

3 namespace Illuminate\Filesystem;

244 public function lastModified($path)

245 {

246 return filemtime($path);

247 }

248

Cache.php (https://github.com/sbourget/moodle.git) PHP · 272 lines

8 * @license http://opensource.org/licenses/MIT MIT

9 *

10 * @link http://scssphp.github.io/scssphp

11 */

12

13 namespace ScssPhp\ScssPhp;

14

15 use Exception;

16 use ScssPhp\ScssPhp\Version;

17

18 /**

File.php (https://github.com/kervin/kyzstudio.git) PHP · 218 lines

1 <?php

2 /**

3 * Zend Framework

18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)

19 * @license http://framework.zend.com/license/new-bsd New BSD License

20 * @version $Id: File.php 23330 2010-11-14 20:08:09Z mabe $

21 */

22

25 * @see Zend_Cache_Core

26 */

27 #require_once 'Zend/Cache/Core.php';

28

29

111 $i = 0;

112 foreach ($masterFiles as $masterFile) {

113 $mtime = @filemtime($masterFile);

114

115 if (!$this->_specificOptions['ignore_missing_master_files'] && !$mtime) {

File.php (https://github.com/azogheb/guzzle.git) PHP · 218 lines

1 <?php

2 /**

3 * Zend Framework

18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)

19 * @license http://framework.zend.com/license/new-bsd New BSD License

20 * @version $Id: File.php 23330 2010-11-14 20:08:09Z mabe $

21 */

22

25 * @see Zend_Cache_Core

26 */

27 // require_once 'Zend/Cache/Core.php';

28

29

111 $i = 0;

112 foreach ($masterFiles as $masterFile) {

113 $mtime = @filemtime($masterFile);

114

115 if (!$this->_specificOptions['ignore_missing_master_files'] && !$mtime) {

xhprof_runs.php (https://gitlab.com/unofficial-mirrors/moodle) PHP · 166 lines

1 <?php

2 //

3 // Copyright (c) 2009 Facebook

124 public function save_run($xhprof_data, $type, $run_id = null) {

125

126 // Use PHP serialize function to store the XHProf's

127 // raw profiler data.

128 $xhprof_data = serialize($xhprof_data);

151 $files = glob("{$this->dir}/*.{$this->suffix}");

152 usort($files, function($a, $b) {

153 return filemtime($b) - filemtime($a);

154 });

155 foreach ($files as $file) {

159 . htmlentities($source) . '">'

160 . htmlentities(basename($file)) . "</a><small> "

161 . date("Y-m-d H:i:s", filemtime($file)) . "</small></li>\n";

162 }

163 echo "</ul>\n";

CacheDependency.php (https://gitlab.com/qiusct/mediawiki-i.git) PHP · 265 lines

1 <?php

2 /**

3 * Data caching with dependencies.

187 $this->timestamp = false;

188 } else {

189 $this->timestamp = filemtime( $this->filename );

190 }

191 }

207 }

208 } else {

209 $lastmod = filemtime( $this->filename );

210 if ( $lastmod > $this->timestamp ) {

211 # Modified or created

File.php (https://github.com/rocknoon/Stack.git) PHP · 218 lines

1 <?php

2 /**

3 * Zend Framework

18 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)

19 * @license http://framework.zend.com/license/new-bsd New BSD License

20 * @version $Id: File.php 23775 2011-03-01 17:25:24Z ralph $

21 */

22

25 * @see Zend_Cache_Core

26 */

27 require_once 'Zend/Cache/Core.php';

28

29

111 $i = 0;

112 foreach ($masterFiles as $masterFile) {

113 $mtime = @filemtime($masterFile);

114

115 if (!$this->_specificOptions['ignore_missing_master_files'] && !$mtime) {

mise_a_jour.php (https://github.com/denisbz/SPIP-1.git) PHP · 89 lines

1 <?php

2

3 /***************************************************************************\

75

76 $url = _VERSIONS_SERVEUR . $dir . '/' . _VERSIONS_LISTE;

77 $a = file_exists($nom) ? filemtime($nom) : '';

78 include_spip('inc/distant');

79 $res = recuperer_lapage($url, false, 'GET', _COPIE_LOCALE_MAX_SIZE, '',false, $a);

Cache.php (https://github.com/installero/grappling_hook.git) PHP · 213 lines

1 <?php

2

3 class Cache {

156 $cache_sec = self::normalizeCacheTime($cache_sec);

157 if ($cache_sec) {

158 $mtime = filemtime($filename);

159 if (time() - $mtime > $cache_sec) {

160 return false;

App.class.php (https://github.com/liujinsong668/epptime.git) PHP · 177 lines

3 // | ThinkPHP [ WE CAN DO IT JUST THINK IT ]

4 // +----------------------------------------------------------------------

5 // | Copyright (c) 2009 http://thinkphp.cn All rights reserved.

6 // +----------------------------------------------------------------------

7 // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )

38 if(defined('RUNTIME_MODEL')){

39 // 运行模式无需载入项目编译缓存

40 }elseif(is_file(RUNTIME_PATH.'~app.php') && (!is_file(CONFIG_PATH.'config.php') || filemtime(RUNTIME_PATH.'~app.php')>filemtime(CONFIG_PATH.'config.php'))) {

41 // 直接读取编译后的项目文件

42 C(include RUNTIME_PATH.'~app.php');

83 if(is_file(COMMON_PATH.'common.php')) {

84 include COMMON_PATH.'common.php';

85 if(!$debug) { // 编译文件

86 $common .= compile(COMMON_PATH.'common.php');

115 $content .= substr(file_get_contents(RUNTIME_PATH.'~runtime.php'),5);

116 $content .= $common."\nreturn ".var_export(C(),true).';';

117 file_put_contents(RUNTIME_PATH.'~allinone.php',strip_whitespace('<?php '.$content));

118 }else{

119 $content = "<?php ".$common."\nreturn ".var_export(C(),true).";\n?>";

File.class.php (https://gitlab.com/fangfangchen/xianpipa) PHP · 181 lines

1 <?php

2 // +----------------------------------------------------------------------

3 // | ThinkPHP [ WE CAN DO IT JUST THINK IT ]

4 // +----------------------------------------------------------------------

5 // | Copyright (c) 2006-2014 http://thinkphp.cn All rights reserved.

6 // +----------------------------------------------------------------------

7 // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )

62 mkdir($this->options['temp'].$dir,0755,true);

63 }

64 $filename = $dir.$this->options['prefix'].$name.'.php';

65 }else{

66 $filename = $this->options['prefix'].$name.'.php';

84 if( false !== $content) {

85 $expire = (int)substr($content,8, 12);

86 if($expire != 0 && time() > filemtime($filename) + $expire) {

87 //缓存过期删除缓存文件

88 unlink($filename);

File.php (https://github.com/Doap/iCms---intelligent-Content-management-system.git) PHP · 218 lines

1 <?php

2 /**

3 * Zend Framework

18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)

19 * @license http://framework.zend.com/license/new-bsd New BSD License

20 * @version $Id: File.php 23330 2010-11-14 20:08:09Z mabe $

21 */

22

25 * @see Zend_Cache_Core

26 */

27 require_once 'Zend/Cache/Core.php';

28

29

111 $i = 0;

112 foreach ($masterFiles as $masterFile) {

113 $mtime = @filemtime($masterFile);

114

115 if (!$this->_specificOptions['ignore_missing_master_files'] && !$mtime) {

GetFiles.php (https://bitbucket.org/webpolis/liiv.git) PHP · 128 lines

1 <?php

2 /*

3 * CKFinder

21 * Include base XML command handler

22 */

23 require_once CKFINDER_CONNECTOR_LIB_DIR . "/CommandHandler/XmlCommandHandlerBase.php";

24

25 /**

90 $i=0;

91 foreach ($files as $file) {

92 $filemtime = @filemtime($_sServerDir . $file);

93

94 //otherwise file doesn't exist or we can't get it's filename properly

95 if ($filemtime !== false) {

96 $filename = CKFinder_Connector_Utils_Misc::mbBasename($file);

97 if (!$resourceTypeInfo->checkExtension($filename, false)) {

ServerTest.php (https://gitlab.com/israel.correa/Expresso.git) PHP · 224 lines

1 <?php

2

3 namespace Sabre\DAV\FSExt;

6 use Sabre\HTTP;

7

8 require_once 'Sabre/DAV/AbstractServer.php';

9

10 class ServerTest extends DAV\AbstractServer{

30 'Content-Type' => 'application/octet-stream',

31 'Content-Length' => 13,

32 'Last-Modified' => HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($this->tempDir . '/test.txt'))),

33 'ETag' => '"' .md5_file($this->tempDir . '/test.txt') . '"',

34 ),

55 'Content-Type' => 'application/octet-stream',

56 'Content-Length' => 13,

57 'Last-Modified' => HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($this->tempDir . '/test.txt'))),

58 'ETag' => '"' . md5_file($this->tempDir . '/test.txt') . '"',

59 ),

Filesystem.php (https://gitlab.com/techniconline/kmc) PHP · 426 lines

1 <?php namespace Illuminate\Filesystem;

2

3 use ErrorException;

217 public function lastModified($path)

218 {

219 return filemtime($path);

220 }

221

class.Cache.inc.php (http://flaimo-php.googlecode.com/svn/trunk/) PHP · 326 lines

1 <?php

2 /* vim: set expandtab tabstop=4 shiftwidth=4: */

3 //+----------------------------------------------------------------------+

32 * </code>

33 *

34 * Tested with Apache 1.3.24 and PHP 4.2.3

35 *

36 * @desc Caching of generated html/text or images&#x2026;

186 $handle = opendir($this->download_dir);

187 while ($file = readdir($handle)) {

188 if (!eregi("^\.{1,2}$",$file) && !is_dir($this->cache_dir . '/' . $file) && (((time() - filemtime($this->cache_dir . '/' . $file)) > $created) || (((time() - fileatime($this->cache_dir . '/' . $file)) > $lastaccess)))) {

189 unlink($this->cache_dir . '/' . $file);

190 } // end if

214 */

215 function isCached($file, $time = 30) {

216 if (($filetime = @filemtime($this->returnCacheFilename($file))) == FALSE) {

217 return (boolean) FALSE;

218 } // end if

image.php (https://github.com/grickit/kredimage.git) PHP · 149 lines

1 <?php

2 include("secrets.php");

80

81 function imageHeaders($location,$etag) {

82 if(isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && (strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) == filemtime($location))) {

83 header('HTTP/1.1 304 Not Modified');

84 }

87 header("Expires: ");

88 header("Content-Type: ");

89 header('Last-Modified: ' . gmdate('D, d M Y H:i:s', filemtime($location)) . ' GMT');

90 header("Etag: ".$etag);

91 }

apiFileCache.php (https://github.com/HGF/CS440.git) PHP · 138 lines

1 <?php

2 /*

3 * Copyright 2008 Google Inc.

63 $cnt = 0;

64 do {

65 // make sure PHP picks up on file changes. This is an expensive action but really can't be avoided

66 clearstatcache();

67 // 250 ms is a long time to sleep, but it does stop the server from burning all resources on polling locks..

96 if (file_exists($storageFile) && is_readable($storageFile)) {

97 $now = time();

98 if (! $expiration || (($mtime = @filemtime($storageFile)) !== false && ($now - $mtime) < $expiration)) {

99 if (($data = @file_get_contents($storageFile)) !== false) {

100 $data = unserialize($data);

class.wsdlcache.php (https://github.com/shafiqissani/Jewelery-Ecommerce-.git) PHP · 209 lines

1 <?php

2 /*

3 The NuSOAP project home is:

13 * @author Scott Nichol <snichol@users.sourceforge.net>

14 * @author Ingo Fischer <ingo@apollon.de>

15 * @version $Id: class.wsdlcache.php,v 1.7 2007/04/17 16:34:03 snichol Exp $

16 * @access public

17 */

84 // check for expired WSDL that must be removed from the cache

85 if ($this->cache_lifetime > 0) {

86 if (file_exists($filename) && (time() - filemtime($filename) > $this->cache_lifetime)) {

87 unlink($filename);

88 $this->debug("Expired $wsdl ($filename) from cache");

SecureSession.php (https://github.com/adrianodemoura/phpGridOld.git) PHP · 186 lines

1 <?php

2 /**

3 * ------------------------------------------------

4 * Encrypt PHP session data using files

5 * ------------------------------------------------

6 * The encryption is built using mcrypt extension

45 /**

46 * Generate a random key

47 * fallback to mt_rand if PHP < 5.3 or no openssl available

48 *

49 * @param integer $length

169 public static function gc($max) {

170 foreach (glob(self::$_path.self::$_name.'_*') as $filename) {

171 if (filemtime($filename) + $max < time()) {

172 @unlink($filename);

173 }

SplFileInfo.php (https://github.com/tstarling/hiphop-php.git) PHP · 432 lines

3 // This doc comment block generated by idl/sysdoc.php

4 /**

5 * ( excerpt from http://php.net/manual/en/class.splfileinfo.php )

6 *

7 * The SplFileInfo class offers a high-level object oriented interface to

189 // This doc comment block generated by idl/sysdoc.php

190 /**

191 * ( excerpt from http://php.net/manual/en/splfileinfo.getmtime.php )

192 *

193 * Returns the time when the contents of the file were changed. The time

410 // This doc comment block generated by idl/sysdoc.php

411 /**

412 * ( excerpt from http://php.net/manual/en/splfileinfo.setinfoclass.php )

413 *

414 * Use this method to set a custom class which will be used when

CachedReader.php (https://github.com/kiranatama/sagalaya.git) PHP · 195 lines

1 <?php

2 /*

3 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS

191 }

192

193 return $this->cache->fetch('[C]'.$cacheKey) >= filemtime($filename);

194 }

195 }

File.php (https://github.com/MontmereLimited/ZendFramework-v1.git) PHP · 222 lines

1 <?php

2 /**

3 * Zend Framework

18 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)

19 * @license http://framework.zend.com/license/new-bsd New BSD License

20 * @version $Id: File.php 24218 2011-07-10 01:22:58Z ramon $

21 */

22

25 * @see Zend_Cache_Core

26 */

27 // // // // // // // // require_once 'Zend/Cache/Core.php';

28

29

112 foreach ($masterFiles as $masterFile) {

113 if (file_exists($masterFile)) {

114 $mtime = filemtime($masterFile);

115 } else {

116 $mtime = false;

dmXmlSitemapGenerator.php (https://github.com/h16bit/diem.git) PHP · 211 lines

1 <?php

2

3 class dmXmlSitemapGenerator extends dmConfigurable

163 $this->checkFileExists($file);

164

165 return filemtime($file);

166 }

167

ajax-get-status.php (https://gitlab.com/ezeql/fups) PHP · 77 lines

1 <?php

2

3 /*

4 * FUPS: Forum user-post scraper. An extensible PHP framework for scraping and

5 * outputting the posts of a specified user from a specified forum/board

6 * running supported forum software. Can be run as either a web app or a

24 */

25

26 /* File : ajax-get-status.php.

27 * Description: The server-side element to supply on demand the scraping status

28 * to the FUPS web app (accessed from Javascript within run.php).

72 <div>

73

74 <a href="<?php echo 'run.php?ajax=yes&amp;token='.$token; ?>">Check progress</a>

75

76 <p>It appears that progress has halted unexpectedly - neither the status file nor the error file have changed in <?php echo MAX_WAIT_SECONDS; ?> seconds. It is likely that an error has caused the process to exit before finishing. We are sorry about this failure. In case you want to be sure that progress has indeed halted, you are welcome to click the "Check progress" link, but otherwise, this page will no longer automatically refresh.</p>

get-nodes.php (https://github.com/camptocamp/cgxp.git) PHP · 66 lines

1 <?php

2 // from php manual page

38

39 $filename = $directory . '/' . $f;

40 $lastmod = date('M j, Y, g:i a', filemtime($filename));

41

42 if(is_dir($directory.'/'.$f)){

cachefile.class.php (https://github.com/ChuguluGames/mediawiki-svn.git) PHP · 170 lines

1 <?php

2 /**

3 * Container for all file-based cache methods. Inherits additional methods from <CacheCore>. Adheres

8 * @copyright 2006-2010 Foleeo, Inc.

9 * @copyright 2008-2010 Contributors

10 * @license http://opensource.org/licenses/bsd-license.php Simplified BSD License

11 * @link http://github.com/skyzyx/cachecore CacheCore

12 * @link http://getcloudfusion.com CloudFusion

147 if (file_exists($this->id))

148 {

149 $this->timestamp = filemtime($this->id);

150 return $this->timestamp;

151 }

combine.class.php (https://github.com/lucascolette/Combine-files.git) PHP · 125 lines

1 <?php

2 /*

3 * Combine js and css files with cache system

87 }

88

89 $cacheModified = filemtime($cacheDir . '/' . $cacheFile);

90 $extensionFile = ($type == 'js') ? '.js' : '.css';

91

92 foreach ($files as $script) {

93 $sourceModified = filemtime($filesDir . '/' . $script . $extensionFile);

94 if ( $sourceModified > $cacheModified ) {

95 return false;

class.session.php (https://bitbucket.org/frchico/chamilo_openshift.git) PHP · 232 lines

1 <?php

2

3 /**

4 * this class provide a function like session handling engine

5 * @author Logan Cai (cailongqun [at] yahoo [dot] com [dot] cn)

6 * @link www.phpletter.com

7 * @since 22/May/2007

8 *

9 */

10

11 require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "class.file.php");

12 class Session

13 {

20 var $ext = '.txt';

21 var $gcCounter = 5; //call gc to delete expired session each ten request

22 var $gcCounterFileName = 'gc_counter.ajax.php';

23 var $gcCounterFile = null;

24 var $gcLogFileName = 'gc_log.ajax.php';

network-simulator.php (https://gitlab.com/brian0218/rk3188_r-box_android4.2.2_sdk) PHP · 186 lines

1 <?php

2 require_once 'portabilityLayer.php';

77

78 if (file_exists($path)) {

79 header("Last-Modified: " . gmdate("D, d M Y H:i:s T", filemtime($path)));

80 header("Content-Type: " . contentType($path));

81

maintain_backups.php (https://github.com/rhempen/cms.git) PHP · 135 lines

99 <table cellpadding="5" cellspacing="1" border="0" width="80%">

100 <tr class="navi_overview_titel">

101 <th width="30%"><?php echo $GLOBALS['BACKUP']['DATEI'];?></th>

102 <th width="30%"><?php echo $GLOBALS['BACKUP']['ERSTELLT'];?></th>

106 </tr>

107

108 <?php

109 foreach($fs as $index => $file) {

110 // Klasse, File mit Pfad, Extension

121 <tr class="<?php echo $class;?>">

122 <td><?php echo $file['datei']; ?></td>

123 <td align="right"><?php echo set_date_time($file['fmt']); ?></td>

125 <td align="center"><?php echo '<a href="'.$srcfile.'">'.$icon.'</a>'; ?></td>

126 <td align="center"><?php echo '<a href="'.$_SERVER['PHP_SELF'].'?act=delete&file='.$file['datei'].'"><img src="../gifs/delete.gif" alt="delete" title="delete" onclick="'.$jscript.'"' ?></td>

127 </tr>

128 <?php

asset.php (https://github.com/LosYear/FluentCMS.git) PHP · 88 lines

13 <th><?php echo YiiDebug::t('Exclude files')?></th>

14 <td><?php echo implode(',', $AM->excludeFiles)?></td>

15 </tr><tr class="even">

16 <th><?php echo YiiDebug::t('New dir mode')?></th>

29 <th><?php echo YiiDebug::t('Files')?></th>

30 <th><?php echo YiiDebug::t('Date create')?></th>

31 <th></th>

32 </tr>

60 <td class="al-c"><?php echo $DF->formatDateTime(filemtime($path))?></td>

61 <td class="al-c">

62 <a class="deleteAsset" href="<?php echo $this->owner->assetsUrl?>/ajax.php?deleteasset=<?php echo $asset?>"

63 onclick="deleteAsset(this, <?php echo $blockAll?'true':'false'?>); return false;">

64 <?php echo YiiDebug::t('Clean')?></a>

65 </td>

66 </tr>

ThemeTest.php (git://github.com/phpmyadmin/phpmyadmin.git) PHP · 269 lines

1 <?php

2

3 declare(strict_types=1);

4

5 namespace PhpMyAdmin\Tests;

6

7 use PhpMyAdmin\Theme;

8 use PhpMyAdmin\ThemeManager;

9

10 use function filemtime;

13

14 /**

15 * @covers \PhpMyAdmin\Theme

16 */

17 class ThemeTest extends AbstractTestCase

FilesystemLoader.php (https://github.com/nguyennamtien/TaskBoxx.git) PHP · 116 lines

1 <?php

2

3 /*

91 }

92

93 return filemtime((string) $storage) < $time;

94 }

95

CreateIndex.php (https://bitbucket.org/Dal-Papa/is-340-publish-base.git) PHP · 97 lines

1 <?php

2 /**

3 * Zend Framework

23 * @see Zend_Search_Lucene

24 */

25 require_once 'Zend/Search/Lucene.php';

26

27 /**

49 }

50 $this->addField(Zend_Search_Lucene_Field::Text('path', $fileName));

51 $this->addField(Zend_Search_Lucene_Field::Keyword( 'modified', filemtime($fileName) ));

52

53 $f = fopen($fileName,'rb');

File.php (https://bitbucket.org/Sinfin/pawtucket.git) PHP · 209 lines

1 <?php

2 /**

3 * Zend Framework

18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)

19 * @license http://framework.zend.com/license/new-bsd New BSD License

20 * @version $Id: File.php 20096 2010-01-06 02:05:09Z bkarwin $

21 */

22

25 * @see Zend_Cache_Core

26 */

27 require_once 'Zend/Cache/Core.php';

28

29

110 $i = 0;

111 foreach ($masterFiles as $masterFile) {

112 $this->_masterFile_mtimes[$i] = @filemtime($masterFile);

113 if ((!($this->_specificOptions['ignore_missing_master_files'])) && (!($this->_masterFile_mtimes[$i]))) {

114 Zend_Cache::throwException('Unable to read master_file : '.$masterFile);

Source.php (https://gitlab.com/flyhope/Hiblog) PHP · 207 lines

1 <?php

2 /**

3 * Class Minify_Source

84

85 // TODO ideally not touch disk in constructor

86 $this->lastModified = filemtime($spec['filepath']);

87

88 if (!empty($spec['uploaderHoursBehind'])) {

ServerTest.php (https://github.com/phpnode/YiiBlocks.git) PHP · 222 lines

1 <?php

2

3 require_once 'Sabre/DAV/AbstractServer.php';

25 'Content-Type' => 'application/octet-stream',

26 'Content-Length' => 13,

27 'Last-Modified' => date(DateTime::RFC1123,filemtime($this->tempDir . '/test.txt')),

28 'ETag' => '"' .md5_file($this->tempDir . '/test.txt') . '"',

29 ),

50 'Content-Type' => 'application/octet-stream',

51 'Content-Length' => 13,

52 'Last-Modified' => date(DateTime::RFC1123,filemtime($this->tempDir . '/test.txt')),

53 'ETag' => '"' . md5_file($this->tempDir . '/test.txt') . '"',

54 ),

file.php (https://github.com/abdelm/stationwagon.git) PHP · 359 lines

1 <?php

2 /**

3 * Part of the Fuel framework.

8 * @license MIT License

9 * @copyright 2010 - 2012 Fuel Development Team

10 * @link http://fuelphp.com

11 */

12

180 if (filetype($this->config['path'] . $file) == 'file' and

181 strpos($file, $this->config['cookie_name'].'_') === 0 and

182 filemtime($this->config['path'] . $file) < $expire)

183 {

184 @unlink($this->config['path'] . $file);

directoryiterator.getmtime.html (https://bitbucket.org/thncr/manuals.git) HTML · 95 lines

10 <div class="next" style="text-align: right; float: right;"><a href="directoryiterator.getowner.html">DirectoryIterator::getOwner</a></div>

11 <div class="up"><a href="class.directoryiterator.html">DirectoryIterator</a></div>

12 <div class="home"><a href="index.html">PHP Manual</a></div>

13 </div><hr /><div id="directoryiterator.getmtime" class="refentry">

14 <div class="refnamediv">

15 <h1 class="refname">DirectoryIterator::getMTime</h1>

16 <p class="verinfo">(PHP 5)</p><p class="refpurpose"><span class="refname">DirectoryIterator::getMTime</span> &mdash; <span class="dc-title">Get last modification time of current DirectoryIterator item</span></p>

17

18 </div>

82 <li class="member"> <span class="methodname"><a href="directoryiterator.getatime.html" class="methodname" rel="rdfs-seeAlso">DirectoryIterator::getATime()</a> - Get last access time of the current DirectoryIterator item</span></li>

83 <li class="member"> <span class="methodname"><a href="directoryiterator.getctime.html" class="methodname" rel="rdfs-seeAlso">DirectoryIterator::getCTime()</a> - Get inode change time of the current DirectoryIterator item</span></li>

84 <li class="member"> <span class="function"><a href="function.filemtime.html" class="function" rel="rdfs-seeAlso">filemtime()</a> - 取得文件修改时间</span></li>

85 </ul>

86 </p>

rsslib.php (https://github.com/tmuras/moodle-debian.git) PHP · 158 lines

1 <?php

2 //This file adds support to rss feeds generation

3

36 $cachedfilelastmodified = 0;

37 if (file_exists($cachedfilepath)) {

38 $cachedfilelastmodified = filemtime($cachedfilepath);

39 }

40 //if the cache is more than 60 seconds old and there's new stuff

63

64 $item->pubdate = $rec->entrytimecreated;

65 $item->link = $CFG->wwwroot."/mod/glossary/showentry.php?courseid=".$glossary->course."&eid=".$rec->entryid;

66 $item->description = format_text($rec->entrydefinition,$rec->entryformat,$formatoptions,$glossary->course);

67 $items[] = $item;

70 //First all rss feeds common headers

71 $header = rss_standard_header(format_string($glossary->name,true),

72 $CFG->wwwroot."/mod/glossary/view.php?g=".$glossary->id,

73 format_string($glossary->intro,true));

74 //Now all the rss items

FMController.php (https://github.com/binhtd/fms-portal-source.git) PHP · 147 lines

1 <?php

2

3 class FMController extends Zend_Controller_Action

33 ( strlen(stripslashes($file)) > 43) ? substr(stripslashes($file), 0, 40) . '...' : stripslashes($file),

34 "filesize" => round(filesize($directoryPath. $file)/1024) . " KB",

35 "createdate" => date ("Y:m:d", filemtime($directoryPath .$file)),

36 "allowDelete" => $fmMapper->isAllowDelete($this->_getParam("handoffid", 0), $this->_getParam("download", "ho"))

37 );

File.php (https://gitlab.com/florianocomercial/centreon) PHP · 209 lines

1 <?php

2 /**

3 * Zend Framework

18 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)

19 * @license http://framework.zend.com/license/new-bsd New BSD License

20 * @version $Id: File.php 20096 2010-01-06 02:05:09Z bkarwin $

21 */

22

25 * @see Zend_Cache_Core

26 */

27 require_once 'Zend/Cache/Core.php';

28

29

110 $i = 0;

111 foreach ($masterFiles as $masterFile) {

112 $this->_masterFile_mtimes[$i] = @filemtime($masterFile);

113 if ((!($this->_specificOptions['ignore_missing_master_files'])) && (!($this->_masterFile_mtimes[$i]))) {

114 Zend_Cache::throwException('Unable to read master_file : '.$masterFile);

File.php (https://github.com/bhaumik25/zend-framework.git) PHP · 435 lines

1 <?php

2

3 /**

25 * @see Zend_OpenId_Consumer_Storage

26 */

27 require_once "Zend/OpenId/Consumer/Storage.php";

28

29 /**

424 }

425 foreach (glob($this->_dir . '/nonce_*') as $name) {

426 if (filemtime($name) < $time) {

427 @unlink($name);

428 }

smarty_internal_runtime_cacheresourcefile.php (https://github.com/usualoma/movabletype.git) PHP · 139 lines

1 <?php

2 /**

3 * Smarty cache resource file clear method

77 }

78 } else {

79 // delete only php files

80 if (substr($_filepath, -4) !== '.php') {

114 if ($exp_time < 0) {

115 preg_match('#\'cache_lifetime\' =>\s*(\d*)#', file_get_contents($_filepath), $match);

116 if ($_time < (filemtime($_filepath) + $match[ 1 ])) {

117 continue;

118 }

119 } else {

120 if ($_time - filemtime($_filepath) < $exp_time) {

121 continue;

122 }

file.php (https://gitlab.com/endomorphosis/greenrenaissancejoomla) PHP · 230 lines

1 <?php

2 /**

3 * @version $Id: file.php 10071 2008-02-27 19:17:32Z ian $

5 * @subpackage Cache

6 * @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.

7 * @license GNU/GPL, see LICENSE.php

8 * Joomla! is free software. This version may have been modified pursuant

9 * to the GNU General Public License, and as distributed it includes or

10 * is derivative of works licensed under the GNU General Public License or

11 * other free or open source software licenses.

12 * See COPYRIGHT.php for copyright notices and details.

13 */

14

59 if (is_file($path)) {

60 if ($checkTime) {

61 if (@ filemtime($path) > $this->_threshold) {

62 $data = file_get_contents($path);

63 }

Cache_file.php (https://github.com/andigehle/CodeIgniter.git) PHP · 203 lines

1 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

2 /**

3 * CodeIgniter

4 *

5 * An open source application development framework for PHP 5.2.4 or newer

6 *

7 * NOTICE OF LICENSE

168 if (is_array($data))

169 {

170 $mtime = filemtime($this->_cache_path.$id);

171

172 if ( ! isset($data['data']['ttl']))

200 }

201

202 /* End of file Cache_file.php */

203 /* Location: ./system/libraries/Cache/drivers/Cache_file.php */

File.php (https://github.com/crmeb/CRMEB.git) PHP · 249 lines

1 <?php

2 // +----------------------------------------------------------------------

3 // | ThinkPHP [ WE CAN DO IT JUST THINK ]

4 // +----------------------------------------------------------------------

5 // | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved.

6 // +----------------------------------------------------------------------

7 // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )

148 $filename = $this->getFileName($sessID);

149

150 if (is_file($filename) && filemtime($filename) >= time() - $this->config['expire']) {

151 $content = $this->readFile($filename);

152

resizer.php (https://github.com/socialplanning/oc-js.git) PHP · 88 lines

1 <?php

2 header('Content-Type: text/javascript; charset=UTF-8');

3

4 /**

5 * Resize images to a given size, and saving in a new file.

6 * resize.php?img=/relative/path/to/image.jpg&width=<pixels>&height=<pixels>[&to=/relative/path/to/newimage.jpg]

7 * relative to the base_dir given in config.inc.php

8 * This is pretty much just thumbs.php with some mods, I'm too lazy to do it properly

9 * @author $Author:ray $

10 * @version $Id:resizer.php 922 2007-12-30 14:35:46Z ray $

64 {

65 // And is newer

66 if(filemtime($resized) >= filemtime($fullpath))

67 {

68 js_success($_GET['to']);

xSendfile.php (https://github.com/livinglab/openlab.git) PHP · 87 lines

1 <?php

2 namespace XSendfile;

3

15 $modifiedSince = $_SERVER['HTTP_IF_MODIFIED_SINCE'];

16 $modifiedSince = strtotime($modifiedSince);

17 if(filemtime($file)==$modifiedSince){

18 header("HTTP/1.1 304: Not Modified");

19 exit;

21 }

22

23 if(isset($_SERVER['IF-NONE-MATCH']) && $_SERVER['IF-NONE-MATCH']==md5(filemtime($file))){

24 header("HTTP/1.1 304: Not Modified");

25 exit;

56

57 if($cache){

58 header("Last-Modified: ". gmdate('D, d M Y H:i:s', filemtime($file)) . ' GMT');

59 header("Expires: ". gmdate('D, d M Y H:i:s', time()+2592000) . ' GMT');

60 header("Cache-Control: max-age=2592000");

Filesystem.php (https://bitbucket.org/larryg/powerhut.git) PHP · 378 lines

1 <?php namespace Illuminate\Filesystem;

2

3 use FilesystemIterator;

167 public function lastModified($path)

168 {

169 return filemtime(realpath($path));

170 }

171

File.php (https://github.com/aleksraiden/Signalsy-2.git) PHP · 218 lines

1 <?php

2 /**

3 * Zend Framework

18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)

19 * @license http://framework.zend.com/license/new-bsd New BSD License

20 * @version $Id: File.php 23329 2010-11-14 16:36:06Z mabe $

21 */

22

25 * @see Zend_Cache_Core

26 */

27 require_once 'Zend/Cache/Core.php';

28

29

111 $i = 0;

112 foreach ($masterFiles as $masterFile) {

113 $mtime = @filemtime($masterFile);

114

115 if (!$this->_specificOptions['ignore_missing_master_files'] && !$mtime) {

FileCacheReader.php (https://github.com/lboynton/zf-acl-navigation.git) PHP · 209 lines

68 if ($this->debug

69 && (false !== $filename = $class->getFilename())

70 && filemtime($path) < filemtime($filename)) {

71 @unlink($path);

72

97 if ($this->debug

98 && (false !== $filename = $class->getFilename())

99 && filemtime($path) < filemtime($filename)) {

100 unlink($path);

101

126 if ($this->debug

127 && (false !== $filename = $class->getFilename())

128 && filemtime($path) < filemtime($filename)) {

129 unlink($path);

130

Source.php (https://bitbucket.org/kudutest1/moodlegit.git) PHP · 187 lines

1 <?php

2 /**

3 * Class Minify_Source

73 $this->filepath = $spec['filepath'];

74 $this->_id = $spec['filepath'];

75 $this->lastModified = filemtime($spec['filepath'])

76 // offset for Windows uploaders with out of sync clocks

77 + round(Minify::$uploaderHoursBehind * 3600);

files.php (https://github.com/genievn/pyrocms.git) PHP · 200 lines

1 <?php defined('BASEPATH') OR exit('No direct script access allowed');

2 /**

3 * @package PyroCMS

121 }

122

123 if ( ! file_exists($image_thumb) OR (filemtime($image_thumb) < filemtime($this->_path . $file->filename)))

124 {

125 if ($mode === $modes[1])

179 }

180 else if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) &&

181 (strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) == filemtime($image_thumb)) &&

182 $expire )

183 {

184 // Send 304 back to browser if file has not beeb changed

185 header('Last-Modified: '.gmdate('D, d M Y H:i:s', filemtime($image_thumb)).' GMT', true, 304);

186 exit();

187 }

comarquage_update_xml.php (https://bitbucket.org/pombredanne/spip-zone-treemap.git) PHP · 80 lines

1 <?php

2 /*

3 * Copyright (C) 2006 Cedric Morin

25 $time = time();

26 foreach ($table as $file){

27 if ( ($time - filemtime($file)) <$GLOBALS['meta']['comarquage_local_refresh']) {

28 $file_liste[] = $file;

29 }

QFileFormStateHandler.class.php (https://github.com/quinta/qcodo.git) PHP · 168 lines

1 <?php

2 /**

3 * This will store the formstate in a pre-specified directory on the file system.

4 * This offers significant speed advantage over PHP SESSION because EACH form state

5 * is saved in its own file, and only the form state that is needed for loading will

6 * be accessed (as opposed to with session, ALL the form states are loaded into memory

7 * every time).

8 *

9 * The downside is that because it doesn't utilize PHP's session management subsystem,

10 * this class must take care of its own garbage collection/deleting of old/outdated

11 * formstate files.

53

54 /**

55 * If PHP SESSION is enabled, then this method will delete all formstate files specifically

56 * for this SESSION user (and no one else). This can be used in lieu of or in addition to the

57 * standard interval-based garbage collection mechanism.

smarty_internal_config.php (https://github.com/kiang/olc_baker.git) PHP · 293 lines

1 <?php

2 /**

3 * Smarty Internal Plugin Config

45 {

46 return $this->config_timestamp === null ?

47 $this->config_timestamp = filemtime($this->getConfigFilepath()) :

48 $this->config_timestamp;

49 }

161 }

162

163 return $_compile_dir . $_filepath . '.' . basename($this->config_resource_name) . '.config' . '.php';

164 }

165 /**

171 {

172 return $this->compiled_timestamp === null ?

173 ($this->compiled_timestamp = (file_exists($this->getCompiledFilepath())) ? filemtime($this->getCompiledFilepath()) : false) :

174 $this->compiled_timestamp;

175 }

filesystem.php (https://github.com/dionyziz/blogcube.git) PHP · 157 lines

1 <?php

2 /*

3 Developer: Makis

105 if ( @copy( $src, $dest ) ) {

106 if ($perm > 0) chmod( $dest, $perm ); //debug: permissions

107 touch( $dest, filemtime( $src ) ); // to track last modified time

108 }

109 else

settings.yml (https://github.com/ShinichiU/OpenPNE3_with_webInstaller.git) YAML · 108 lines

10 dev:

11 .settings:

12 error_reporting: <?php echo (E_ALL)."\n" ?>

13 web_debug: true

14 cache: false

18 test:

19 .settings:

20 error_reporting: <?php echo (E_ALL)."\n" ?>

21 cache: false

22 web_debug: false

27 .settings:

28 # Form security secret (CSRF protection)

29 csrf_secret: <?php echo filemtime(__FILE__)."\n" ?> # Unique secret to enable CSRF protection or false to disable

30

31 # Output escaping settings

52 i18n: on # Enable interface translation. Set to off if your application should not be translated.

53 # check_symfony_version: off # Enable check of symfony version for every request. Set to on to have symfony clear the cache automatically when the framework is upgraded. Set to off if you always clear the cache after an upgrade.

54 # compressed: off # Enable PHP response compression. Set to on to compress the outgoing HTML via the PHP handler.

55 # check_lock: off # Enable the application lock system triggered by the clear-cache and disable tasks. Set to on to have all requests to disabled applications redirected to the $sf_symfony_data_dir/web/errors/unavailable.php page.