lastModified.func.php文件
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了lastModified.func.php文件相关的知识,希望对你有一定的参考价值。
With this snippet you will have the ability to deliver the most recent version of any file.When dealing with a browser's cache you can't be certain your viewers are getting the most recent copy. By appending a GET value (the UNIX timestamp) to, for example, a stylesheet, you can make the browser think the stylesheet is dynamic, thus reloading the stylesheet time the modification date changes.
<?php /** * lastModified * * @author demon.devin * @link PortableAppz.cu.cc/ * @copyright 2016 * @package lastMofified * @version 1.0 * * With this snippet you will have the ability to deliver the most recent version of any file. * When dealing with a browser's cache you can't be certain your viewers are getting the most * recent copy. By appending a GET value (the UNIX timestamp) to, for example, a stylesheet, * you can make the browser think the stylesheet is dynamic, thus reloading the stylesheet time * the modification date changes. * * PARAMETERS * $filepath string path to the file of the document you wish to use * * EXAMPLE: * <link rel="stylesheet" type="text/css" href="<?php echo lastModified('../css/style.css'); ?>" /> * * OUTPUT: * <link rel="stylesheet" type="text/css" href="style.css?1477050530" /> */ // //default settings function lastModified($filepath) { $timeStamp = $filepath.'?'.$lastModified; return $timeStamp; } } ?>
以上是关于lastModified.func.php文件的主要内容,如果未能解决你的问题,请参考以下文章