会话变量&的区别是什么? PHP中的全局变量? [英] What is the difference between session variables & Global variables in php?

查看:67
本文介绍了会话变量&的区别是什么? PHP中的全局变量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

会话&之间有什么区别? PHP中的全局变量?

What is the difference between session & Global variables in php?

推荐答案

全局变量是整个应用程序通用的变量……它们的值可以在整个应用程序中使用,而会话变量是整个应用程序但对于一个特定用户仍然通用的变量.它们也可以在整个应用程序中使用...但是它们会在特定的用户会话结束时消失.

Global variables are the variables which remain common for the whole application… Their value can be used across the whole application whereas Session variables are variables which remain common for the whole application but for one particular user. They also can be used across the whole application… But they die when a particular user session ends.

这篇关于会话变量&的区别是什么? PHP中的全局变量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆