Home  >  Article  >  CMS Tutorial  >  How to set the display time format in Imperial CMS

How to set the display time format in Imperial CMS

尚
Original
2019-07-31 15:35:434345browse

How to set the display time format in Imperial CMS

How to process the time format of the content page of the Empire CMS list page:

1. Check the list template on the list page

"Use program code", the list content template example is as follows:

$listtemp='
<li>
<a href="[!--titleurl--]" title="[!--oldtitle--]">[!--title--]</a> 
<span> &#39;.date("Y-m/d H:i:s",$r[newstime]).&#39;</span>
</li> &#39;;

2. Content page

<?=date("YmdHis",$navinfor[&#39;newstime&#39;])?>

Example: If I only want to display the month and day, and separate them with "/", then We can call

<?=date("m/d",$navinfor[&#39;newstime&#39;])?>

as follows Recommendation: Empire cms website building tutorial

The above is the detailed content of How to set the display time format in Imperial CMS. For more information, please follow other related articles on the PHP Chinese website!

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