如何使用C ++代码维护会话? [英] How to maintain sessions with C++ code?

查看:163
本文介绍了如何使用C ++代码维护会话?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个用C ++编写的cgi代码。目前没有在网页中完成的会话管理。需要在网页中提供会话,使得用户可以登录,维护会话然后注销。虽然这是一个相当简单的任务在Java HttpSession,我不知道如何这样做与C + +代码。

There is a cgi code written in C++. Currently there is no session management done in the web pages. There is a need to provide sessions in the web pages so that the user can login, maintain session and then logoff. While this is a fairly simple task in java with HttpSession, I have no clue how to do this with C++ code.

推荐答案

C +不像Java在捆绑库的功能广度,所以你需要扩展语言与一些额外的库不那么常见的任务(如C + + CGI开发)。您可以自行构建库以支持标准库中不存在的功能,也可以使用第三方开发的功能。

C++ is not like Java in the breadth of the functionality of the bundled libraries, so you need to extend the language with some extra libraries for not so common tasks (such as C++ CGI development). You can either build the library yourself to support functionality not present in the standard library, or use one developed by a third party.

在这种情况下,我将使用< a href =http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP%5FDOC/ =nofollow> NCBI C ++工具包。它提供了一个很好的 CGI模块会话支持

In this case I'd use the NCBI C++ Toolkit. It provides a nice CGI module with session support

这篇关于如何使用C ++代码维护会话?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆