关于CSDN,淘宝等 登陆页面的原理!该怎么解决
关于CSDN,淘宝等 登陆页面的原理!!
刚进入CSDN页面,还未登陆时,最上面显示:
您还未登陆!|登陆|注册|帮助
登陆之后显示:
欢迎***** 我的:收件箱 资源 博客 空间 |退出
者个的原理是什么??
是用session做的还是其它??
还有未登陆显示的页面和登陆之后出来的页面是一个还是两个??
欢迎****** ****的值是怎么传过来的???
希望说清原理!! 先谢啦!!
------解决方案--------------------
http://topic.csdn.net/u/t5/t5.js
js,读取cookie控制的,,,都是明文
------解决方案--------------------
session,cookie都使用了
cookie,用来存,你的初次登陆时间,当一周后,但断开。
cookie,用来存你的加密,密码,故而,你第天访问之时,会自动登录。
session,用来,你在不同页面间访问,而不丢失。故而,你的跨页面浏览得以实现。
------解决方案--------------------
session啊,读书系统学习一下吧,别晃荡了。
------解决方案--------------------
cookie,session 都用了,本人已经模仿它做出来这个效果了。当你登陆时,会有个checkbox问你是否 记住一周。打上勾勾,登陆时就把你的用户名和密码记录到你电脑中一个名为cookie的文件夹中,默认貌似是隐藏的。当你再次登陆时,系统会先看看你客户端有没有cookie,可能要遍历所有的cookie,并判断是否失效(对时间人家自有加密算法,这里不做研究)。如果存在cookie,就会登陆成功,并把用户的信息(应该是个对象,不知您对面向对象了解多少)保存到session中,这样你在登陆后所有的页面都会看到你已登陆的信息。关于是不是一个页面的问题:我本人认为肯定是一个页面。可能是这样做的。不好意思写段伪代码:
@session_start();
if(!isset($_SESSION['用户名'])){
echo "
}else{
echo "
}
?>
只是判断session是否存在用户登陆信息显示不同的div而已。整体的页面并没有变动。
写了这么多,给点分吧。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Screen brightness is an integral part of using modern computing devices, especially when you look at the screen for long periods of time. It helps you reduce eye strain, improve legibility, and view content easily and efficiently. However, depending on your settings, it can sometimes be difficult to manage brightness, especially on Windows 11 with the new UI changes. If you're having trouble adjusting brightness, here are all the ways to manage brightness on Windows 11. How to Change Brightness on Windows 11 [10 Ways Explained] Single monitor users can use the following methods to adjust brightness on Windows 11. This includes desktop systems using a single monitor as well as laptops. let's start. Method 1: Use the Action Center The Action Center is accessible

In iOS 17, Apple introduced several new privacy and security features to its mobile operating system, one of which is the ability to require two-step authentication for private browsing tabs in Safari. Here's how it works and how to turn it off. On an iPhone or iPad running iOS 17 or iPadOS 17, Apple's browser now requires Face ID/Touch ID authentication or a passcode if you have any Private Browsing tab open in Safari and then exit the session or app to access them again. In other words, if someone gets their hands on your iPhone or iPad while it's unlocked, they still won't be able to view your privacy without knowing your passcode

The famous activation script MAS2.2 version supports digital activation again. The method originated from @asdcorp and the team. The MAS author calls it HWID2. Download gatherosstate.exe (not original, modified) from https://github.com/massgravel/Microsoft-Activation-Scripts, run it with parameters, and generate GenuineTicket.xml. First take a look at the original method: gatherosstate.exePfn=xxxxxxx;DownlevelGenuineState=1 and then compare with the latest method: gatheros

Cookies are usually stored in the cookie folder of the browser. Cookie files in the browser are usually stored in binary or SQLite format. If you open the cookie file directly, you may see some garbled or unreadable content, so it is best to use Use the cookie management interface provided by your browser to view and manage cookies.

Cookies on your computer are stored in specific locations on your browser, depending on the browser and operating system used: 1. Google Chrome, stored in C:\Users\YourUsername\AppData\Local\Google\Chrome\User Data\Default \Cookies etc.

Session failure is usually caused by the session lifetime expiration or server shutdown. The solutions: 1. Extend the lifetime of the session; 2. Use persistent storage; 3. Use cookies; 4. Update the session asynchronously; 5. Use session management middleware.

Solution to the cross-domain problem of PHPSession In the development of front-end and back-end separation, cross-domain requests have become the norm. When dealing with cross-domain issues, we usually involve the use and management of sessions. However, due to browser origin policy restrictions, sessions cannot be shared by default across domains. In order to solve this problem, we need to use some techniques and methods to achieve cross-domain sharing of sessions. 1. The most common use of cookies to share sessions across domains

Cookies on the mobile phone are stored in the browser application of the mobile device: 1. On iOS devices, Cookies are stored in Settings -> Safari -> Advanced -> Website Data of the Safari browser; 2. On Android devices, Cookies Stored in Settings -> Site settings -> Cookies of Chrome browser, etc.
