Php idea and method for automatically implementing code
Source: Internet
Author: User
The idea and method for php to automatically execute code are as follows: I have an order and each order has time, however, the reason for changing the status value of an expired order is that all orders before today are regarded as expired. my general idea is to execute code at or after every day, modify the status value of the previous order, but I don't know how to implement it. I hope you can help me and provide some ideas or methods, first, write your script. However, the idea and method for php to automatically execute code
Currently, I want to implement the following functions:
I have an order, each order has a time, but you need to change the status value of the expired order
The reason for expiration is that all orders before today are deemed to have expired.
My general idea is to execute code at or later every day and change the previous order status value, but I don't know how to implement it.
I hope you can help me to provide some ideas or methods.
------ Solution --------------------
Write your script first, and then let the server regularly execute the method in the script every day.
------ Solution --------------------
Write a php code to change the status value of an expired order.
Then you can run this file at a specified point on the server. do you know how to write the code? Or what?
------ Solution --------------------
Windows server timing tasks are the same as linux crontab tasks.
Http://blog.csdn.net/usherhll/article/details/6681205
Write a php script to modify expired orders in batches
Find php.exe and use php.exe. execute this script after. over
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service