Wordpress 中文
探索
首页
所有页面
社区页
交互式地图
最新博文
页面
最新页面
WordPress的安装过程
为WordPress寻找虚拟主机
使用SVN升级WordPress
First Steps With WordPress
管理留言面板
Introduction to Blogging
FAQ About WordPress
最新博客
分类
Getting Started
Backing Up Your Database
Database Description
FAQ About WordPress
FAQ Installation
FAQ New To WordPress
Importing Content
Podcasting
Troubleshooting
Backing Up Your Database
FAQ
FAQ About WordPress
FAQ Advanced Topics
FAQ Codex
FAQ Developer Documentation
FAQ Installation
社区
社区首页
社区中心
帮助中心
FANDOM
游戏
电影
电视
wiki
探索wiki
社区中心
创建wiki
尚未注册?
注册
登录
FANDOM
Explore
Current Wiki
创建wiki
尚未注册?
注册
登录
登录
注册
Wordpress 中文
145
个页面
探索
首页
所有页面
社区页
交互式地图
最新博文
页面
最新页面
WordPress的安装过程
为WordPress寻找虚拟主机
使用SVN升级WordPress
First Steps With WordPress
管理留言面板
Introduction to Blogging
FAQ About WordPress
最新博客
分类
Getting Started
Backing Up Your Database
Database Description
FAQ About WordPress
FAQ Installation
FAQ New To WordPress
Importing Content
Podcasting
Troubleshooting
Backing Up Your Database
FAQ
FAQ About WordPress
FAQ Advanced Topics
FAQ Codex
FAQ Developer Documentation
FAQ Installation
社区
社区首页
社区中心
帮助中心
不轉換
简体
繁體
簡體中文
disable
澳門繁體
大马简体
disable
正體中文
编辑“
WordPress Cookies
”
返回页面
编辑
可视化编辑器
查看历史
讨论 (0)
正在编辑
WordPress Cookies
注意:
你尚未登入本站,你的IP位置會被記錄在本頁的修訂歷史頁中。
反垃圾检查。
不要
加入这个!
__TOC__ WordPress 使用存储在你自己电脑中的cookies,或曰小甜饼来验证你的身份。分为登陆的用户和评论者两种cookies。 ==用户== Users are those people who have registered an account with the WordPress blog in question. 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. 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. 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 [[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. 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 [[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. ==评论者== 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. ==参考== * [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] [[Category:WordPress Development]]
摘要:
请注意在Wordpress 中文上的所有贡献都将依据CC-BY-SA进行发布。
取消
编辑帮助
(在新窗口中打开)
Follow on IG
TikTok
Join Fan Lab