mobile-first
赵鹏 6 years ago
parent 321d7fce51
commit a3147b0102

@ -10,7 +10,7 @@
defined('BASEPATH') or exit('No direct script access allowed'); defined('BASEPATH') or exit('No direct script access allowed');
ini_set('memory_limit','256M'); ini_set('memory_limit', '256M');
class updatestation extends CI_Controller class updatestation extends CI_Controller
{ {
@ -30,13 +30,14 @@ class updatestation extends CI_Controller
$this->load->view('bootstrap3/footer'); $this->load->view('bootstrap3/footer');
} }
public function test(){ public function test()
$results=""; {
for($i=1; $i<=2000000; $i++){ $results = "";
$results.='"'.$i.'"'; for ($i = 1; $i <= 2000000; $i++) {
$results .= '"' . $i . '"';
} }
$len = strlen($results); $len = strlen($results);
header("Content-Length: ".$len); header("Content-Length: " . $len);
header("Content-Encoding:UTF-8"); header("Content-Encoding:UTF-8");
echo $results; echo $results;
} }
@ -54,7 +55,7 @@ class updatestation extends CI_Controller
$arr_Station = explode("@", str_replace("';", "", str_replace("var station_names ='", "", $StationData))); $arr_Station = explode("@", str_replace("';", "", str_replace("var station_names ='", "", $StationData)));
//print_r($arr_Station); //print_r($arr_Station);
$NewStation = ""; $NewStation = "";
$UpdateStaion=""; $UpdateStaion = "";
for ($i = 0; $i < count($arr_Station); $i++) { for ($i = 0; $i < count($arr_Station); $i++) {
if ($arr_Station[$i] != null) { if ($arr_Station[$i] != null) {
$arr_StationDetail = explode("|", $arr_Station[$i]); $arr_StationDetail = explode("|", $arr_Station[$i]);
@ -82,7 +83,14 @@ class updatestation extends CI_Controller
} }
} }
} }
$NewStationList = $UpdateStaion.$NewStation; $NewStationList = $UpdateStaion . $NewStation;
$len = strlen($NewStationList); //count( explode("@",$NewStationList))-1;
header("Content-Length: " . $len);
header("Content-Encoding:UTF-8");
echo $NewStationList;
if ($len > 0) {
//发送邮件 //发送邮件
$this->station_model->SendMail( $this->station_model->SendMail(
"UpdateStationSystem", "UpdateStationSystem",
@ -92,11 +100,7 @@ class updatestation extends CI_Controller
'New Station(by12306):' . date("Y-m-d"), 'New Station(by12306):' . date("Y-m-d"),
$NewStationList $NewStationList
); );
}
$len = strlen($NewStationList);//count( explode("@",$NewStationList))-1;
header("Content-Length: ".$len);
header("Content-Encoding:UTF-8");
echo $NewStationList;
} }
/** /**
@ -126,7 +130,6 @@ class updatestation extends CI_Controller
$isNew = false; $isNew = false;
break; break;
} }
} }
} }

Loading…
Cancel
Save