How to view session details in php using firebug?

眉间皱痕 提交于 2019-12-06 10:33:16

You could try this :

<script>
    console.log(<?php echo json_encode($_SESSION, JSON_HEX_TAG); ?>);
</script>

No quotes are required. See as well Firebug and Logging.


[edit, May 2014] Updated the code to be safe against XSS attacks. Always pass JSON_HEX_TAG to json_encode if you're embedding in HTML, or an attacker could inject code into the DOM by having you encode a string like:

</script><script>alert('Hello!');
Vijayan

It is not possible to view the session details using fire bug.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!