webForumDet fria alternativet
Logga in / Bli medlem

php_auth

PHP

1 svar · 262 visningar · startad av fluxis

Medlem sedan feb. 200167 inlägg
Trådstart#1

går det att ta bort en inloggning på php_auth_user & _pw ?

och isådanafall hur då ?

den ända vägen jag vet är att stänga av webläsaren och gå till sidan igen. det e ju lite jobbigt.

Medlem sedan maj 20028 inlägg
#2

http://se.php.net/manual/en/features.http-auth.php

Both Netscape Navigator and Internet Explorer will clear the local browser window's authentication cache for the realm upon receiving a server response of 401. This can effectively "log out" a user, forcing them to re-enter their username and password. Some people use this to "time out" logins, or provide a "log-out" button.

This behavior is not required by the HTTP Basic authentication standard, so you should never depend on this. Testing with Lynx has shown that Lynx does not clear the authentication credentials with a 401 server response, so pressing back and then forward again will open the resource as long as the credential requirements haven't changed. The user can press the '_' key to clear their authentication information, however.

Also note that this does not work using Microsoft's IIS server and the CGI version of PHP due to a limitation of IIS.

251 ms totalt · 4 externa anrop · v20260731065814-full.51f67c91
120 ms — deklarationer (db)
0 ms — hämta statistik (cache)
128 ms — hämta tråd, inlägg och bilagor (db)
119 ms — ändringar (db)