CodeIgniter Forums
Does CI persists? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Does CI persists? (/thread-52615.html)



Does CI persists? - El Forum - 06-18-2012

[eluser]mlakhara[/eluser]
This may be just a dumb question(even for beginners), but I was struck at this confusion two days ago and have not been able to figure it out through my internal conscience.
Does CI framework persists between two requests by the client?
for example if I set a static variable's value during in one model and try to access that value after some time, would it be fundamentally correct for me to expact that value to be set that way?



Does CI persists? - El Forum - 06-19-2012

[eluser]WanWizard[/eluser]
PHP doesn't have any persistence, so anything build on top of PHP doesn't have it too.

To create persistence in a PHP application you use session storage, to pass data from one request to the next. See http://ellislab.com/codeigniter/user-guide/libraries/sessions.html


Does CI persists? - El Forum - 06-19-2012

[eluser]wiredesignz[/eluser]
@mlakhara,

First off PHP has nothing to do with the HTTP protocol we use for web applications.

Web applications do not persist data between client requests without the help of session tracking or cookies.

CodeIgniter offers both methods of web application persistence. Both session tracking and cookies so it's your choice.