好奇怪啊,只能向mysql中插入500条数据,多一点也不行? 
源代码 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ for ($i = 2; $i <= $data->sheets[0]['numRows']; $i++) { //以下注释的for循环打印excel表数据 
/* for ($j = 1; $j <= $data->sheets[0]['numCols']; $j++) { echo "\"".$data->sheets[0]['cells'][$i][$j]."\","; } echo "\n"; */ //以下代码是将excel表数据【3个字段】插入到mysql中,根据你的excel表字段的多少,改写以下代码吧! 
$sql = "INSERT INTO uc_members(username ,Phone,Address,cattype) VALUES(". 
$data->sheets[0]['cells'][$i][4].",'". 
$data->sheets[0]['cells'][$i][4]."','". 
$data->sheets[0]['cells'][$i][2]."','". 
$data->sheets[0]['cells'][$i][3]."')".';'; if($data->sheets[0]['cells'][$i][4]==$data->sheets[0]['cells'][$i+1][4]){ 
echo '您的数据发现重复数据!'; 
}else{ 
mysql_query($sql); 

}