如果使用验证码,是否需要创建数据库? [英] Do you need to create database if you using captcha?

查看:748
本文介绍了如果使用验证码,是否需要创建数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果使用验证码,是否需要创建数据库?

Do you need to create database if you using captcha?

推荐答案

否.验证码与数据库无关.但是,它们通常与注册/登录系统结合使用,而 通常与数据库一起实现.
No. Captchas are not related to a database. However, they''re usually used in conjunction with a registration/login system, and that is generally implemented with a database.


否,在大多数情况下,验证码存储在Session变量中.当用户提交带有验证码的表单时,您只需将提交的值与会话中存储的值进行比较(如果您使用的是会话).

一个简单的验证码示例的示例在这里:
CAPTCHA图像 [
No, in most cases a captcha is stored in a Session variable. When a user submits a form that has a captch you simply compare the value submitted against the value stored in the session (that''s if you are using sessions).

An example of a simple captcha example is here:
CAPTCHA Image[^]


不!您不一定需要数据库即可在您的网站上使用验证码.

最好的问候,

—MRB
No! You don''t necessarily need a database to use CAPTCHAs on your website.

Best Regards,

—MRB


这篇关于如果使用验证码,是否需要创建数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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