Home >php教程 >php手册 >模板引擎系统变量now增加24小时类型

模板引擎系统变量now增加24小时类型

WBOY
WBOYOriginal
2016-06-07 11:45:381455browse

switch($vars[1]){
case 'NOW':
$parseStr = "date('Y-m-d g:i a',time())";
break;
case 'NOW24':
$parseStr = "date('Y-m-d H:i',time())";
break;
case 'VERSION':
$parseStr = 'THINK_VERSION';
break;
case 'TEMPLATE':
$parseStr = "'".$this->templateFile."'";//'C("TEMPLATE_NAME")';
break;
case 'LDELIM':
$parseStr = 'C("TMPL_L_DELIM")';
break;
case 'RDELIM':
$parseStr = 'C("TMPL_R_DELIM")';
break;
default:
if(defined($vars[1]))
$parseStr = $vars[1];
}
=================================================
switch($vars[1]){
case 'NOW': $parseStr = "date('Y-m-d g:i a',time())";break;
[red] case 'NOW24': $parseStr = "date('Y-m-d H:i',time())";break;[/red]
case 'VERSION': $parseStr = 'THINK_VERSION';break;
case 'TEMPLATE':$parseStr = 'C("TEMPLATE_NAME")';break;
case 'LDELIM': $parseStr = 'C("TMPL_L_DELIM")';break;
case 'RDELIM': $parseStr = 'C("TMPL_R_DELIM")';break;
default: if(defined($vars[1])) $parseStr = $vars[1];

AD:真正免费,域名+虚机+企业邮箱=0元

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn