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?
精彩评论