Update Time: 1970
This is because the phpcms update time field does not get the value when editing the update time of the article, but it does set the value of each field (including the update time) when editing) when a static page is generated while the database is saved, the update time of the generated static page is 1970 because no value is assigned to the update time.
Solution:
The code is as follows: |
Copy code |
$ _ POST ['info'] ['updatetime'] = SYS_TIME; |
Add the above code to the edit method (submit) of the content controller of the content module.
Appendix, released on August 1, January 01, 1970
The tag is "called through custom SQL", and the original SQL statement is:
The code is as follows: |
Copy code |
Select distinct c. contentid, c. title, c. style, c. url FROM 'phpcmscom _ content' c, 'phpcmscom _ content_tag't WHERE c. contentid = t. contentid and c. 'status' = 99 AND t. 'Tag' IN (". get_ SQL _in ($ r [keywords]). ") order by c. contentid DESC |
There is no execution function for release time. You only need to add the function for release time to display the actual release time. The modified statement is as follows:
The code is as follows: |
Copy code |
Select distinct c. contentid, c. title, c. inputtime, c. style, c. url FROM 'phpcmscom _ content' c, 'phpcmscom _ content_tag't WHERE c. contentid = t. contentid and c. 'status' = 99 AND t. 'Tag' IN (". get_ SQL _in ($ r [keywords]). ") order by c. contentid DESC |
Note: add the following code:
The code is as follows: |
Copy code |
C. inputtime, |