代码示例采集100条信息,但采集到了24条就出现借误
Fatal error: Maximum execution time of 30 seconds exceeded in D:\采集示例\index.php on line 15
代码如下:
<?
function get_sub_content($str, $start, $end){
if ( $start == '' || $end == '' ){
return;
}
$str = explode($start, $str);
$str = explode($end, $str[1]);
return $str[0];
}$go=1;
for($go=1;$go<=100;$go++)
{
$c="http://www.k8vod.net/View.Asp?ID=$go";
$doc = file_get_contents("$c");
$author = get_sub_content($doc,"<title>","</title>");
$author = trim($author);
echo $author."<br>";
}
?>
请各位大吓帮忙处理错误
Fatal error: Maximum execution time of 30 seconds exceeded in D:\采集示例\index.php on line 15
代码如下:
<?
function get_sub_content($str, $start, $end){
if ( $start == '' || $end == '' ){
return;
}
$str = explode($start, $str);
$str = explode($end, $str[1]);
return $str[0];
}$go=1;
for($go=1;$go<=100;$go++)
{
$c="http://www.k8vod.net/View.Asp?ID=$go";
$doc = file_get_contents("$c");
$author = get_sub_content($doc,"<title>","</title>");
$author = trim($author);
echo $author."<br>";
}
?>
请各位大吓帮忙处理错误
解决方案 »
- 拍卖页面,如何同步刷新显示最高价格?
- php 的 CGI模式 问题
- 类似QQ农场的功能,主要用到哪些知识
- php 能否制作 时间触发器
- 如何点击左边的标题,然后在右边的文章内容???
- unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}'
- php取得当前网页的路径,急
- 怎么在网页中点击连接直接关机?
- php+mysql做的网上书店,用户的订单放在orders表中,想通过此表,来写sql语句生成商品被购买的排行榜,怎么写?急!谢谢!
- 有人能给我一个简单的php +mysql的论坛源程序吗?
- undefined function mysql_connect()
- 大家好!把mysql4.0升级到5.0,在导数据的时候出现报错....
set_time_limit( 1000 );