Welcome Guest, Not a member yet? Register   Sign In
ErrorException: ini_set() A session is active.
#6

(01-26-2024, 09:05 PM)berky Wrote: My header helper literally just loads a few pure php files.

header.php
--> starts php session, so it can check whether or not user is logged in; redirecting user if not logged in
--> loads some javascript functions
--> displays navigation menu's that are the same for all pages

header.php does too many things.
It can be split into three parts:
1. Session thing
2. JavaScript functions
3. displays navigation menu

3. is a part of a view. Load it in your view file.

1. is the problem. Don't call session functions in the controller.
2. has no problem. In CI context, it would be a helper file.
Reply


Messages In This Thread
RE: ErrorException: ini_set() A session is active. - by kenjis - 01-27-2024, 04:40 PM



Theme © iAndrew 2016 - Forum software by © MyBB