Thinkphp time intercept into html how to write.

use the thinkphp3.2.3 framework, call the date style on the front page as shown below, how to write it in html? Can fall out, but the style can not show the effect of the following figure, do not want to add separate date parameters in the database.

Feb.28,2021
If the data stored in

is a timestamp, you can directly use the date () function of php. If it is not a timestamp, then convert it into a timestamp with strtotime () first, and then you need to select Y, or html d


to change the perspective. It is solved that html's own time interception method is used for processing, and the one in thinkphp is no longer used. Previously, I planned to add a field to the database to make the call, but also gave up.


after reading the questions and answers of the landlord, I still don't know the needs of the landlord.
does the landlord want to show the current date?


if it really doesn't work, then html embedded source code, in fact, mvc mode is executed through regular judgment of embedded source code, if not, poor runtime files, follow suit.


if your date variable is a time stamp, the variable name is $datetime
if it is a string, switch to a time stamp first
you actually want to display the variable three times. One year, one month, one day.
does the landlord mean how to display this variable in the template?
year {$datetime | date= "Y"}
month {$datetime | date= "m"}
date {$datetime | date= "d"}

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b9d5c2-50a12.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b9d5c2-50a12.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?