1 $f= fopen("D:/tradesns2/public/mail.txt","r");
2 $testModel = new Default_Model_Test();
3 $i=1;
4 $j =1;
5 while (!feof($f))
6 {
7 $line = trim(fgets($f));
8 if (!preg_match("/^hr@/i", $line)) {
9  // $count = $testModel->insertMail($line);
10 $j++;
11 }else{
12 $i++;
13 // echo "site: ",$line,"<br />";
14 }
15 }
16 echo '共:'.$j.'条数据插入到数据库中<br>';
17 echo '共:'.$i.'条重复数据';
18 fclose($f);
19
20 exit;

 

posted on 2010-09-01 17:13  Dufe王彬  阅读(183)  评论(0编辑  收藏  举报