As far as I know this isn't supposed to be handled by php/codeigniter, but it is a matter of server management. How, depends on which server you are working on: for instance, on linux, you can use "logrotate" (https://serverfault.com/questions/391538/logrotate-daily-and-size), on windows you can get info from here (https://serverfault.com/questions/418410/log-rotation-windows).
I have enabled error logging in codeigniter and my logs folder path is
in this folder files are being created from codeigniter automatically as
I want that the files which are older than two days should be deleted automatically, so is there any way in codeigniter to do this or I have to create a
cron for this purpose?
Thanks in advance.