Upload .txt file of size 15 mb or more
Hello everybody,
I have to upload .txt file in mysql table. This data is to be displayed by using mysql queries. 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 uploading 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 changes I have to made to upload more than 12 mb file.
Thanks in advace.
|