Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use Crontab to realize PHP script timing task under CentOS

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces the relevant knowledge of "how to use Crontab to achieve PHP script timing tasks under CentOS". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

1. To prepare, create a datasheet "person"

Create table `person` (`firstname` varchar) not null, `lastname` varchar (100th) default null, `age` varchar (100th) default null, primary key (`firstname`) engine=innodb default charset=latin1

2. Create a php script "test.php" to insert into the database table. This script can be placed anywhere. Ps: it is recommended not to put it under the wwwroot root directory, because in this way, users can access it through url. This security is not high, but there are some conveniences. We use some of our own php frameworks, such as ci, tp, etc., and we can also use some general business classes packaged by ourselves! Take into account the actual situation to make a decision.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report