使用会话变量 [英] Use of session variables

查看:67
本文介绍了使用会话变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我很好奇,如果可以将数组放入会话变量中。

我想将一些搜索结果存储在这样的变量,

因此它将是一个对象数组。但是我不知道

如果这甚至是会话变量的预期目的,

而且我也不知道会话变量持有多长时间,

或者会话变量的最大大小。

有人可以解释一下吗?


感谢任何信息.. 。

Hi all,

I was curious if one can put an array in a session variable.
I want to store some search results in such a variable,
so it would be an array of objects. However I don''t know
if that was even the intended purpose of a session variable,
and I also don''t know how long session variables are held,
or if there is a maximum size for a session variable.
Can anyone explain?

Thanks for any info...

推荐答案

pl ****** *@yahoo.com 写道:

大家好,


我很好奇如果可以放一个会话变量中的数组。

我想在这样的变量中存储一些搜索结果,

所以它将是一个对象数组。但是我不知道

如果这甚至是会话变量的预期目的,

而且我也不知道会话变量持有多长时间,

或者会话变量的最大大小。

有人可以解释一下吗?


感谢任何信息.. 。
Hi all,

I was curious if one can put an array in a session variable.
I want to store some search results in such a variable,
so it would be an array of objects. However I don''t know
if that was even the intended purpose of a session variable,
and I also don''t know how long session variables are held,
or if there is a maximum size for a session variable.
Can anyone explain?

Thanks for any info...



当然有可能,会话存储在服务器端,并且

基本上没有限制。 />

<?php

Of course it''s possible, sessions are stored server-side and there''s
basically no limitation.

<?php


_SESSION [] =
_SESSION[] =


my_array; ?>


它只是一个二维数组。


-thib'


PS你可以在
my_array; ?>

It''s just a bidimensional array.

-thib′

PS you can define a key for the array in the


这篇关于使用会话变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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