Initializing a Session |
I'm new to CI and a lot of things involved with it. I'm trying to get a Login Form example working in CI4. I suspect the code is for a previous CI version.
I've read the CI User Guide pages on the Session Library however am not clear where the code to initialize the session goes. I looked to put it in the autoload.php file as in the example code, however that file looks completely different to the one I have in my AppStarter-initialized app so no idea where to insert it there. Then I've read that the code should be put in the Controller constructor which gave me errors. Then I read somewhere else that it should be put in a constructor of a class that extends BaseController not Controller. I've only just started using CI and the tutorial Controller classes extended the Controller class so I'm not really sure of the differences between the two. Anyhow, despite this I tried putting it in the constructor of a Controller that extended BaseController but got the following: Code: ErrorException Grateful for any help or advice on any of this - thanks! |
Messages In This Thread |
Initializing a Session - by jim1001 - 05-17-2020, 11:57 AM
RE: Initializing a Session - by jreklund - 05-17-2020, 01:59 PM
RE: Initializing a Session - by jim1001 - 05-19-2020, 07:10 AM
RE: Initializing a Session - by dave friend - 05-19-2020, 08:12 AM
RE: Initializing a Session - by jim1001 - 05-19-2020, 11:04 AM
RE: Initializing a Session - by dave friend - 05-19-2020, 02:29 PM
RE: Initializing a Session - by jim1001 - 05-20-2020, 01:25 AM
|