View Single Post
 
Old October 24th, 2007, 09:27 AM
rapraj rapraj is offline
Authorized User
 
Join Date: Feb 2007
Location: IIT Kanpur, UP, India.
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default Uplad txt field of size greater than 12 mb

Hi Everybody..

I have to upload .txt file in mysql table. This data is to be displayed by using mysql qureries. I have use upload .txt file by code shown below


$destinationdir = "/var/www//html/telephone/uploadfiles/";
 $destinationfile = $destinationdir . $_FILES['myfile']['name'];
 if(move_uploaded_file($_FILES['myfile']['tmp_name'],$destinationfile))
 {
  $bloadquery="load data local infile '$destinationfile' into table billtable fields terminated by '|' enclosed by '' lines terminated by '\\r\\n'";

   if(execute_query($bloadquery))
   {
      header("Location: uploadsuccess.php");
      exit;
      }
.......
......
}


This code working well for uploadding 150000 (approx) lines means file of size in 50 kb but it fails for for uploading file having size 12 mb or more than 12 mb.

So please suggest me what should i change so that full file having more than 12 mb can be upladed
Thanks