bootstrap手机页面
来源:互联网 发布:c语言for break 编辑:程序博客网 时间:2024/05/18 18:01
<?php
ignore_user_abort();//关掉浏览器,PHP脚本也可以继续执行.
set_time_limit(0);// 通过set_time_limit(0)可以让程序无限制的执行下去
$interval=30;// 每隔半小时运行
$i = 1;
do{
//这里是你要执行的代码
header("Content-type: text/html; charset=utf-8");
$url = 'http://localhost/cfyj/dean.php?s=Synchrodata/index';
$ch = curl_init();//初始化curl
curl_setopt($ch, CURLOPT_URL,$url);//抓取指定网页
curl_setopt($ch, CURLOPT_HEADER, 0);//设置header
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);//要求结果为字符串且输出到屏幕上
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$data = curl_exec($ch);//运行curl
curl_close($ch);
if(!file_exists('action_time.txt')) break;
$file = "action_time.txt";
$content = "这是第".$i."次执行!/r/n";
$fp = fopen($file, "a+");
fwrite($fp,$content);
fclose($fp);
$i++;
sleep($interval);// 等待10分钟
}while(true);
?>
ignore_user_abort();//关掉浏览器,PHP脚本也可以继续执行.
set_time_limit(0);// 通过set_time_limit(0)可以让程序无限制的执行下去
$interval=30;// 每隔半小时运行
$i = 1;
do{
//这里是你要执行的代码
header("Content-type: text/html; charset=utf-8");
$url = 'http://localhost/cfyj/dean.php?s=Synchrodata/index';
$ch = curl_init();//初始化curl
curl_setopt($ch, CURLOPT_URL,$url);//抓取指定网页
curl_setopt($ch, CURLOPT_HEADER, 0);//设置header
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);//要求结果为字符串且输出到屏幕上
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$data = curl_exec($ch);//运行curl
curl_close($ch);
if(!file_exists('action_time.txt')) break;
$file = "action_time.txt";
$content = "这是第".$i."次执行!/r/n";
$fp = fopen($file, "a+");
fwrite($fp,$content);
fclose($fp);
$i++;
sleep($interval);// 等待10分钟
}while(true);
?>
阅读全文
0 0
- bootstrap手机页面
- bootstrap手机页面
- 【Bootstrap】一个PC、平板、手机同时使用而且美观的登陆页面
- 简单web页面支持手机自适应,只需配置一些信息而没有用到bootstrap框架
- bootstrap 手机 菜单
- bootstrap手机界面自适应
- 手机页面
- 手机页面
- Android-Bootstrap:Android手机版的Bootstrap
- jsp bootstrap表单页面
- 页面布局 bootstrap
- bootstrap 登录页面
- bootstrap 后台管理页面
- Bootstrap学习:页面标题
- Bootstrap 页面布局
- LayoutIt! 设计Bootstrap页面
- jsp bootstrap表单页面
- Bootstrap页面模板
- kafka学习笔记
- 第七章:Django开发中数据库的高级使用
- php定时自动运行thinkphp方法(含停止)
- struct 与 class 区别总结
- ReactNative__npm使用
- bootstrap手机页面
- 暑期集训之前M大的数
- 线程状态图
- 【SEP4020】ImageMagick和libdmtx的移植 for Arm7
- spring框架的XML扩展特性:让spring加载和解析你自定义的XML文件
- C#学习之数据类型、变量与方法
- BZOJ2820: YY的GCD(Mobius反演)
- 【Bootloader】U-BOOT全线移植分析系列之四--U-boot如何引导Linux内核启动?
- 【docker】-mysql启动