Created
October 7, 2014 09:39
-
-
Save eiel/ed23fb0bf5a9787ab1c5 to your computer and use it in GitHub Desktop.
a-blog CMSでファイルの更新を検知してクエリパラメータを変更する。固定値がはいりまくりのバージョン
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once ACMS_LIB_DIR.'GET.php'; | |
class ACMS_GET_File_Mtime extends ACMS_GET | |
{ | |
function get() | |
{ | |
$Tpl = new Template($this->tpl); | |
$labels = $Tpl->_varIdLabel; | |
$dir = "THEME_DIR"; | |
$root = "ROOT_DIR"; | |
$values = array(); | |
foreach ($labels as $label) { | |
$path = $root.$dir.$label; | |
$date = date('YmdHis', filemtime($path)); | |
$values[$label] = "?".$date; | |
} | |
$Tpl->add(null, $values); | |
return $Tpl->get(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
利用例
php/ACMS/GET/File に配置する