+ -
当前位置:首页 → 问答吧 → session不能传递一个xml对象吗 ?

session不能传递一个xml对象吗 ?

时间:2011-12-21

来源:互联网

我使用session传递一个xml对象 但是想取出来时却找不到了 为什么?

作者: twlhh   发布时间: 2011-12-21

要先序列化对象

作者: imbigsnake1   发布时间: 2011-12-21

该回复于2011-12-21 10:46:14被管理员删除

  • 对我有用[0]
  • 丢个板砖[0]
  • 引用
  • 举报
  • 管理
  • TOP
  • twlhh
  • (twlhh)
  • 等 级:
#3楼 得分:0回复于:2011-12-21 10:53:03
我将它序列化出错了 我的xml是用simple_xml解析的 对象中包含对象

作者: hustgonia   发布时间: 2011-12-21

将对象转化成xml再保存吧。

看手册就知道了
The value to be serialized. serialize() handles all types, except the resource -type. You can even serialize() arrays that contain references to itself. Circular references inside the array/object you are serializing will also be stored. Any other reference will be lost. 

作者: twlhh   发布时间: 2011-12-21

贴出你的代码!

把对象放到 session 中是不需要序列化的

作者: jakey9826   发布时间: 2011-12-21