678

Cit e de sigura metoda data de accesare a paginilor doar pentru administrator...(admin page)

admin.phpinclude "pass.php";$auth=0; if($_SERVER["PHP_AUTH_USER"] == $ADMIN && $_SERVER["PHP_AUTH_PW"] == $PASS) $auth = 1; if($auth != 1) { Header("WWW-Authenticate: Basic realm=\"Admin page\""); Header("HTTP/1.0 401 Unauthorized"); echo "F5 pentru a incerca din nou."; exit; }echo "Aici numai adminul poate ajunge....";/*instructziunile pentru admin....*/-------end admin.php---------------------- pass.php$ADMIN="adminlogin";$PASS="adminpass";?>--------end pass.php------------------------ .htaccessDirectoryIndex index.php index.html index.htm Order allow,deny Deny from all Satisfy All--------end .htaccess------------------------
0