I am just starting with CodeIgniter and I am trying to hash my regular modules / functions to make them work within the framework of MVC. I have a few specific questions for those who have a strong CodeIgniter background:
MEETINGS
A CodeIgniter session stores client-side session data in a cookie that does not work for me. I know there are several replacements for it, or I could create my own library / helper; but I just don't see any benefit from using $_SESSION .
If I just use $_SESSION , will I have problems with the rest of the framework? Any other part of the structure depends on the use of the CodeIgniter session?
I am a bit strange to go beyond the scope for something so basic, but itβs pretty convenient for me to use simple PHP. I basically just want to use CodeIgniter for MVC and apply the more modular aspect to my projects.
FLOW AND CONFIGURE
I have several configuration items that need to be done before almost anything.
For example, let's say I have the APP_LIVE constant, which is set as true / false based on the name of the current server. This should happen very early, since it will install paths, error reports, CodeIgniter system and application folders, etc.
The problem is that system_folder and application_folder (which will be installed based on which server the code is running on) are installed first in the index.php file before any of the configurations are loaded.
In addition, I have functions that check things in the URL and can be redirected before the page ever loads. For example, some pages should indicate the presence of www. in the URL (for SEO), track branches, visitor sources, advertising flags, etc.
Where is the best place for things that should happen very early? I know that there is a configuration file, startup file, constant file, etc., but it is too late for some elements. Is it a good practice to just put these things at the top of the main index.php file or include them in the global configuration file? Again, I feel that I am going beyond the scope, and wondering if I am not doing this because I do not have a clear understanding yet?
AREA / FUNCER HEADER
Like most people, I have a header, navigation, footer, etc. I'm used to just adding them to the files that are included in my page template. I believe that I can do the same just by making them look and including them in my main pageview. Is this the best way to go? Some of them need some data; for example, which page they use for navigation, etc. What is the best way to handle navigation, general header / footer, etc.?