开发者

Is there a fast way to append the session name to all links?

Is there a fast and efficient way to append a ?sid=asdasdasd or a &sid=asdasdasd to all urls on a page using PHP? Should I use output buffering for this?

I'm trying to have something like:

<a href="/something.php">hello</a>

to change to:

<a href="/something.php?sid=somethingrandom">hello</a&g开发者_运维问答t;


In your PHP configuration, turn off session cookies, and turn on transparent sid support, which will automatically rewrite links to include a session ID.

Note that URL-based sessions are considered a bad practice.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜