Is there a way of storing variables in a PHP application in the session scope or the application scope...? At the same time can someone please explain the life cycle of a php program..? Thanx...
life cycle of a php program is very short.
It's not like a desktop application constantly running in your browser, and not even a demon with persistent connection to your desktop application. It's more like a command line utility - doing it's job and exits. It runs discrete:
That's why you need sessions - to save the variables between calls.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.