本段是转载的,看到标题也挺想知道结果,结果是 $money_sum 。。。。大家多多捐赠吧,也挺少的。
/**
* 计算ThinkPHP捐赠总数
*/
$money_sum = 0; //总金额数目
$page_sum = 51; //总页数,没用自动获取,直接写的
for($j=1; $j
$url = "http://www.thinkphp.cn/donate/index/p/".$j.".html";
$content_area = substr(file_get_contents($url), 10068);
$main_area = substr($content_area, 0, -3970);
preg_match_all('/¥(.*)/', $main_area, $money_arr);
for($i=0; $i
$money_sum += $money_arr[1][$i];
}
}
echo $money_sum;//31541.05
?>
AD:真正免费,域名+虚机+企业邮箱=0元









