MYSQL + PHP timing control function. For example:
I have set the time to 18:00:00 to 18:00:00 this time to publish an article. When the server runs until 18:00:00, publishing is automatically disabled. How to implement such a function?
Reply to discussion (solution)
Just judge when publishing an article.
Convert the server time and the above two times into a timestamp to determine whether the server time can be released within this period of time. if not, the server time cannot be released!
Yes, it seems that both the frontend and backend can be controlled.
You can restrict the buttons! You must publish an article by limiting the action.
It is published only when the server determines the time of submission.
When loading the page, the front-end will write the current time of the server and the time range that can be released into the js variable, and then the js will control whether to display the submit button based on the time.
It can be judged every second.
First, I would like to ask you, how do you implement regular release? If it is through the program, then you can determine the time, if it is through the task plan, then it is necessary?