CodeIgniter Forums
Codeigniter 2 ID Active Controllers - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6)
+--- Forum: CodeIgniter 2.x (https://forum.codeigniter.com/forumdisplay.php?fid=18)
+--- Thread: Codeigniter 2 ID Active Controllers (/showthread.php?tid=75749)



Codeigniter 2 ID Active Controllers - cipyrocms - 03-12-2020

My task is to remove duplicate and unused files from a production CI application.  I've identified errors but not certain I can move a entire file to junk or just a portion. View files have been reduced by 80% and Models have been mostly inactive. Currently the focus is on approximately 100 controllers (80 have been named to indicate they are a prior version) with average 1500 lines and 4 library(s) of 5,000+ lines.


This is line 1 for a number of php files in the controller folder.

<?  if (!defined('BASEPATH')) exit('No direct script access allowed');

should it be:

<?php  if (!defined('BASEPATH')) exit('No direct script access allowed');

Would this be enough to put it in junk or is there something else that should be maintained as a priority?


RE: Codeigniter 2 ID Active Controllers - jreklund - 03-12-2020

All <? should be replaced with <?php, if it's not followed by =, like this: <?=

We can't tell you what files are important or not for your project, only that the CodeIgniter framework are intact.


RE: Codeigniter 2 ID Active Controllers - cipyrocms - 03-12-2020

Thank you there are no =. error messages and file paths many times are displaying incorrect location with many duplicate files and folders. There are consistent errors and deviations from best practices but wasn't sure if it would be enough to throw an error or prevent page load.


RE: Codeigniter 2 ID Active Controllers - jreklund - 03-12-2020

If it's the same application you made a thread about earlier. We can't help you locate what files are being used or not. You will need to test/find out that yourself I'm afraid.

PS. I moved the thread into CodeIgniter 2.x as this are considered legacy.