php 服务器脚本

WBOY
Release: 2016-06-23 14:28:08
Original
1508 people have browsed it

如何写一个php 脚本,将数据表a的数据每天定时复制到数据表b中 ? 求助……


回复讨论(解决方案)

你的服?器是linux?是windows?
如果是linux?比???,你可以用linux附?的crontab???定?操作,windows?比?麻?.可能要用任???

奇怪设置计划任务会比 修改 crontab 文件麻烦?
需该文件要权限,还要注意格式
计划任务只需钩钩就成了

服务器是linux 的,有参考的代码吗?多谢各位

*/10 * * * * /usr/localhost/webservice/php/bin/php  /www/test/test.php >> /var/log/sendApi.log
Copy after login


crontab 来添加定时执行程序

多谢,数据表a的id 是自动递增,数据表b的id不能自动递增,复制表的时候,比如如果表a中有多个id 如何将数据一条一条的循环插入数据表b中,使用的数据库是mysql!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!