站长百科 | 数字化技能提升教程 数字化时代生存宝典
首页
数字化百科
电子书
▼
建站程序
开发
服务器
办公软件
开发教程
▼
服务器教程
软件使用教程
运营教程
热门电子书
▼
CSS教程
WordPress教程
导航
程序频道
推广频道
网赚频道
人物频道
网站程序
网页制作
云计算
服务器
CMS
论坛
网店
虚拟主机
cPanel
网址导航
WIKI使用导航
WIKI首页
热点词条
最新资讯
网站程序
站长人物
页面分类
使用帮助
编辑测试
创建条目
网站地图
站长百科导航
站长百科
主机侦探
IDCtalk云说
跨境电商导航
WordPress啦
站长专题
网站推广
网站程序
网站赚钱
虚拟主机
cPanel
网址导航专题
云计算
微博营销
虚拟主机管理系统
开放平台
WIKI程序与应用
美国十大主机
编辑“
WordPress:WordPress Cookies
”
人物百科
|
营销百科
|
网赚百科
|
站长工具
|
网站程序
|
域名主机
|
互联网公司
|
分类索引
Seadragon530
(
讨论
|
贡献
)
2008年5月10日 (六) 14:02的版本
(
差异
)
←上一版本
|
最后版本
(
差异
) |
下一版本→
(
差异
)
跳转至:
导航
、
搜索
警告:您正在编辑的是本页面的旧版本。
如果您发布该更改,该版本后的所有更改都会丢失。
警告:
您没有登录。如果您做出任意编辑,您的IP地址将会公开可见。如果您
登录
或
创建
一个账户,您的编辑将归属于您的用户名,且将享受其他好处。
反垃圾检查。
不要
加入这个!
__TOC__ WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters. WordPress 使用cookies, 或者说是小的信息储存在你的电脑中,来验证你是谁。有登陆的cookies,也有发表评论用的cookies。 ==Users== Users are those people who have registered an account with the WordPress blog in question. ==用户== 用户是那些已经注册一个帐户,拥有WordPress blog的人。 When you log into WordPress from <tt><nowiki>http://example.com/wp-login.php</nowiki></tt>, WordPress stores the following two cookies: * Your user name * A double-hashed copy of your password The cookies are set to expire one year from the time they are set. 当你从<tt><nowiki>http://example.com/wp-login.php</nowiki></tt>登陆WordPress时,WordPress储存了如下两个cookies: * 你的用户名 * 加密过的密码副本 The cookies are set to expire one year from the time they are set. The actual cookies contain ''hashed'' data, so you don't have to worry about someone gleaning your username and password by reading the cookie data. A ''hash'' is the result of a specific mathematical formula applied to some input data (in this case your user name and password, respectively). It's quite hard to reverse a hash (bordering on practical infeasibility with today's computers). This means it is very difficult to take a hash and "unhash" it to find the original input data. cookies 设置成从建立之日起一年后失效。 实际上cookies包括''加密的'' 数据, 所以你不用担心有人通过阅读cookie发现你的用户名和密码。 ''加密''是一种特殊的数学算法的结果,应用于某种输入数据 (本文中是你的用户名和密码)。很难将一个加密过的内容反转成文本 (使用现有的电脑进行过实践的可行性)。这意味这它很难"反加密" 得到原始输入数据。 WordPress uses the two cookies to bypass the password entry portion of <tt>wp-login.php</tt>. If WordPress recognizes that you have valid, non-expired cookies, you go directly to the WordPress [[WordPress:Administration Panels|Administration]] interface. If you don't have the cookies, or they're expired, or in some other way invalid (like you edited them manually for some reason), WordPress will require you to log in again, in order to obtain new cookies. WordPress使用两种cookies来隐藏<tt>wp-login.php</tt>的密码输入部分。如果 WordPress 认为你是合法的,没有过期的cookies,你可以直接进入WordPress [[WordPress:Administration Panels|管理]]界面。如果你没有这个cookies,或者是已经过期,或者其他原因而导致不合法的话,(如你手动编辑过它们),WordPress 将会要求你重新登陆以获得新的cookies。 The functions to set and remove cookies are currently defined in <tt>/wp-includes/pluggable-functions.php</tt>. ;<tt><nowiki>wp_setcookie($username, $password, $already_md5 = false, $home = '', $siteurl = '')</nowiki></tt> :This function sets the cookie. ;<tt>wp_clearcookie()</tt> :This function will delete the cookie from the client browser. This happens when the user clicks on the <strong>Logout</strong> link in the [[WordPress:Administration Panels|Administration]] interface. The following function also utilizes the cookies: ;<tt>auth_redirect()</tt> :Checks whether the cookie is present on the client browser. If it <em>is not</em>, the user is sent to the <tt>wp-login.php</tt> login screen. After logging in, the user is sent back to the page he or she attempted to access. 设置和移动cookies的函数目前定义在 <tt>/wp-includes/pluggable-functions.php</tt>文件内。 ;<tt><nowiki>wp_setcookie($username, $password, $already_md5 = false, $home = '', $siteurl = '')</nowiki></tt> :这个函数设置cookie. ;<tt>wp_clearcookie()</tt> :这个函数会从客户浏览器中删除cookie。当用户点击[[WordPress:Administration Panels|管理]]界面中的<strong>Logout</strong>链接时执行。 下面几种函数也用到cookies: ;<tt>auth_redirect()</tt> :查看cookie是否应用在客户端浏览器中。如果<em>没有</em>,用户就会被链接到<tt>wp-login.php</tt>登陆界面。在登陆之后,用户可以回到刚才想进入的页面。 ==Commenters== When visitors comment on your blog, they too get cookies stored on their computer. This is purely a convenience, so that the visitor won't need to re-type all their information again when they want to leave another comment. Three cookies are set for commenters: * <tt>comment_author</tt> * <tt>comment_author_email</tt> * <tt>comment_author_url</tt> Again, all the data in the cookies is stored hashed. When the visitor returns to your blog, WordPress checks for the existence of their cookie, and then tries to compare their hashed data with the values stored in the WordPress database. The commenter cookies are set to expire a little under one year from the time they're set. ==评论者== 当访问者在你的blog上留下评论时,他们也会存储cookies到他们的电脑上。 这非常方便,这样当访问者想留下另外一个评论的时候,不需要重新输入他们所有的信息。有三个cookies是关于评论者的: * <tt>comment_author</tt> * <tt>comment_author_email</tt> * <tt>comment_author_url</tt> 所有存储在cookies中的数据都是经过加密的。当访问者返回你的blog时, WordPress 查看他们的cookie是否存在,然后试着用储存在WordPress数据库中的数据与加密过的信息比较。 评论者cookies设置成略少于一年的时间过期。 ==References== * [http://en.wikipedia.org/wiki/HTTP_cookie Wikipedia: Cookies] * [http://wp.netscape.com/newsref/std/cookie_spec.html Netscape cookie specification] * [http://www.faqs.org/rfcs/rfc2965 RFC2965] * [http://www.php.net/manual/en/features.cookies.php PHP cookie documentation] ==参考== * [http://en.wikipedia.org/wiki/HTTP_cookie Wikipedia: Cookies] * [http://wp.netscape.com/newsref/std/cookie_spec.html Netscape cookie 说明] * [http://www.faqs.org/rfcs/rfc2965 RFC2965] * [http://www.php.net/manual/en/features.cookies.php PHP cookie 文档]
摘要:
请注意,您对站长百科的所有贡献都可能被其他贡献者编辑,修改或删除。如果您不希望您的文字被任意修改和再散布,请不要提交。
您同时也要向我们保证您所提交的内容是您自己所作,或得自一个不受版权保护或相似自由的来源(参阅
Wordpress-mediawiki:版权
的细节)。
未经许可,请勿提交受版权保护的作品!
取消
编辑帮助
(在新窗口中打开)
本页使用的模板:
模板:WordPress导航
(
查看源代码
)(受保护)