开发者

serialise php session variables into json format

I want to 开发者_开发问答access PHP session variables through jQuery. What is the best way to do so?


<?php
echo json_encode($_SESSION);
?>

Be careful what you store in the session though. ;)


https://github.com/zhangjiayin/php_session_json_handler/

PHP EXTENSION FOR SESSION WITH JSON FORMAT SAERIALIZE

config php.ini

session.serialize_handler = json

maybe help you,try it?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜