Welcome Guest, Not a member yet? Register   Sign In
How to read files and insert into DB
#1

Hello ,

i have a folder contain around 4000 file , i wanna use a codeiginter to read all these files and then insert the filename and file contain to database table .

i create the database table like :

id
filename
filecontant

thanks
Reply
#2

You could easily do this using the directory helper and the file helper, but unless you need to monitor this directory and keep it up to date as a long-term feature of a website, I'm not sure why you would bother going through CodeIgniter to do this, rather than just writing a one-time script.
Reply
#3

(08-27-2015, 06:42 AM)Gladiator_x Wrote: Hello ,

i have a folder contain around 4000 file , i wanna use a codeiginter to read all these files and then insert the filename and file contain to database table .

i create the database table like :

id
filename
filecontant

thanks

what it does mean "contain to database table", let me guess do you have folder around 4000 file then you need to store file name and also file contain, is it such as articles which writing in m word, am i correct ! if yes it such as articles it will not handle by codignter you should create common CRUD write file name and copy paste your container to text are then submit it! hope fully my guess not wrong sorry if i'm wrong
Reply




Theme © iAndrew 2016 - Forum software by © MyBB