访问 /ext/mysql 扩展中的会话变量
我已经声明了一个看起来像的结构
typedef struct
{
char* key;
char* value;
}kvPair;
,在会话结构中,我声明了一个变量,
struct session
{
char* id;
..... // other session variables
kvPair* pair;
}
现在在 session_start 中我已经初始化了对变量的值,并且我必须在 /ext/mysql 扩展中访问这些值。关于如何实现它的建议将不胜感激
I have declared a structure that look like
typedef struct
{
char* key;
char* value;
}kvPair;
and in the session structure, i declared a variable as
struct session
{
char* id;
..... // other session variables
kvPair* pair;
}
Now in the session_start I have initialised the values for the pair variable and I have to access these values in /ext/mysql extension. A suggestion on how to achieve it would be greatly appreciated
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不确定你想做什么,但是如果你想通过这个脚本读取会话中保存的数据:
那么是的,你可以使用会话扩展公开的 API:
然后你有这些功能:
I'm not sure what you're trying to do, but if you want to read data that was saved in the session e.g. through this script:
Then yes, you can use the API exposed by the session extension:
Then you have these functions: