//
public function curlSendEmails(){
$get = I("get.");
$userObj = M("User","","DB_ONE");
$meailObj = M("Mail","","DB_ONE");
$result = $userObj -> field("id") -> limit($get["star"],$get["end"]) -> select();
$l = array(
"userId" => 0,
"type" => $get["type"],
"fromName" => $get["fromName"],
"title" => $get["title"],
"content" => $get["content"],
"replaceArgs" => $get["replaceArgs"],
"items" => $get["items"],
"isPicked" => $get["isPicked"],
"isRead" => $get["isRead"],
"delHours" => $get["delHours"],
"delTime" => $get["delTime"],
"expireTime" => $get["expireTime"],
"addTime" => $get["addTime"],
"isDelete" => $get["isDelete"],
"taskId" => $get["taskId"],
);
$data = array();
$i = 0;
$time = time();
foreach($result as $key => $r){
$userId = $r["id"];
$l["userId"] = $userId;
$data[] = $l;
if($i >= 100 || !isset($result[($key + 1)])){
$r = $meailObj -> addAll($data);
$i = 0;
$data = array();
}
$iPP;
}
}
pictures and code blocks are attached to facilitate you to have different habits to view, this is this, I have curl get access to it elsewhere, but it does not have the effect of its code (data writing). Excuse me, is there any writing that is not up to standard?