oho...ok...
I have 2 test files
1. 348270 records. 30.4MB
2. 10 records. 864bytes
When I test the smaller file, it works great...but when I tried the larger file, it doesn't even move on to say "The file was uploaded."
Code:
if(in_array($ext, $allowedext))
{
$filename = $_FILES['file']['tmp_name'];
//move_uploaded_file($filename,"upload/".$_FILES['file']['name']);
//$fh = fopen($_FILES['file']['tmp_name'], 'r');
$handle = fopen($filename, "r");
while (($data = fgetcsv($handle, 100000, ',', '"')) !== FALSE)
{
//echo ("data<br />");
//echo $data;
//echo ("<br />data_array<br />");
//$data_array = explode(",",$data);
//print_r ($data_array);
//echo ("<br />");
$value1 = $data[0];
$value2 = $data[1];
$value3 = $data[2];
$value4 = $data[3];
$value5 = $data[4];
$value6 = $data[5];
$value7 = $data[6];
$value8 = $data[7];
$value9 = $data[8];
$value10 = $data[9];
$value11 = $data[10];
$value12 = $data[11];
$query = "INSERT INTO testtsttbills VALUES ('$value1','$value2','$value3','$value4','$value5','$value6','$value7','$value8','$value9','$value10','$value11','$value12')";
$qry = mysql_query($query,$conn);
}
//$contents = fread($handle, filesize($filename));
fclose($handle);
//echo $contents;
echo "<div align='center'><font color='red'>The file was uploaded.</font></div>";
}