使用 Joomla 自定义会话

2022-01-06 00:00:00 session php joomla

我已尝试将 Joomla 构建到我现有的网站中,以便我可以将其用于优质内容.

I've trying to build Joomla into my existing website so I can use it for premium content.

我已经有一个定制的身份验证系统,可以设置我自己的会话变量.

I've already got a custom-built authentication system that sets my own session variables.

出于某种原因,Joomla(位于不同目录中)不想识别这些会话变量,即使添加了 session_start();所有 Joomla 页面顶部的一行.

For some reason, Joomla (which is located in a different directory) doesn't want to recognize these session variables, even when adding the session_start(); line at the top of all Joomla pages.

知道如何让 Joomla 识别我的自定义会话变量,以便将 Joomla 中的内容限制为仅限高级用户吗?

Any idea how I can get Joomla to recognize my custom session variables so I can limit the content located in Joomla to only premium users?

谢谢.

推荐答案

Joomla 使用他们自己的会话管理,所以当你使用 php session 时它不会工作保证.要解决这个问题,请尝试使用 joomla 会话管理.

Joomla uses their own session management so when you use php session it wont work guarantee. To get around this just try to juse joomla session management.

这可能会解决您的问题.

相关文章