网络营销电子商务研究中心  
How to buy the best prescription safety glasses in Canada? Let's study!
Go Back   网络营销电子商务研究中心 > 网站建设 > 代码交流
User Name
Password
 
FAQ Members List Calendar Cheap Glasses

代码交流 ASP,PHP,JSP等网站源代码下载与交流。

Reply
 
Thread Tools Display Modes
  #1   IP: 218.2.29.60
Old 2006-12-15, 07:25 PM
smiling smiling is offline
高级会员
 
Join Date: 2006-02-12
Posts: 502
smiling 正向着好的方向发展
Default 用session代替apache服务器验证

对于需要身份验证的页面,使用apache服务器验证是最好不过的了。
不过,apache服务器验证的界面不够友好。而且,并不是所有的情况
都可以使用apache服务器验证,比如cgi模式的php,iis下的php。



用session可以在不同页面间保存用户身份,比如


login.php




user:
pass:



next page;
}
}

?>

next.php


但是,用户可以使用http://domain.name.com/next.php?user=uuu
来绕过身份验证。

所以,实际的next.php必须是这样:


使用session_is_registered()来检测session变量,
这样,用session已经基本实现对身份的可靠验证。
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off

Forum Jump

Prescription-glasses.com offers prescription glasses online at discount prices.
All times are GMT +8. The time now is 11:08 AM.


Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.